Jeff Gensler
1 min readMar 3, 2023

--

I have always thought of hw_commands as a way of passing data along. it contains the "value" that should be written to a hardware device. A Joint cant one of several types: see http://wiki.ros.org/urdf/XML/joint#Attributes

so for a Continuous join (like a motor on a remote control car) the value in this array might be revolutions / second. for a Revolute join with limits (like a servo), this value might be a specific angle.

I am not sure if there are other values that are passed along. My understanding is that writing the hardware controller should really not contain much logic at all. it is the responsibility of the rest of the control stack to plan/coordinate movements over time and take care of more stateful / algorithmic robot behaviors.

I think calculating the "x y z" of each component (like how far away a gripper might be from a body of a robot) would also be calculated higher up the stack. by reading (and trusting) the value from hw_states_ , a control system could compute that a 30 degree angle of an arm must mean a particular position of a gripper. the data in the URDF file would tell any computation 1) how long an arm struct is and 2) where the joint connects two structs so reading a value of 30 degrees must mean a particular "x y z".

--

--

Responses (1)