[Rock-dev] assumptions in joint_dispatcher -- NamedVector

Jakob Schwendner jakob.schwendner at dfki.de
Fri Mar 7 14:02:59 CET 2014


> First of all you should not hard code the joint names in your controller.
> They should be configurable. E.g.
> joints[_leftMotorName.get()].speed = 0.0; In this case you can configure the
> correct names everywhere in your system, on motor driver level, and on
> controller level.
Agreed. We might think about a way to standardise the configuration. One thing that could be handled properly then is the name/index duality. Because we said joints can also be identified by index. This would be something that the configuration should provide, and is easily usable in the code.
This is one of the examples where dynamic mapping of names indexes would make it harder. If the mapping was static, the code could do the mapping once in the configure hook, and then use indexes instead of strings for access. Much nicer on the cpu as well :)

Jakob




More information about the Rock-dev mailing list