In this document we will describe how the package is built.
control_loop.hpp initializes controller manager (load, unload controller dynamically) then it loads rosparams (
update function reads data from Hardware interface, let the controller computes the new command (via the controller manager), then it send new command to hardware.
hardware_interface.hpp class implement an Hardware Interface for a set of dynamixel actuators.
This class fits in the ros_control framework for robot control.
Different method are implemented :
- Initialise the whole hardware interface. Set the essential parameters for communication with the hardware and find all connected devices and register those referred in dynamixel_map in the hardware interface.
- Copy joint’s information to memory, firstly queries the information from the dynamixels, then put it in private attributes, for use by a controller.
- Send new joint’s target position to dynamixels takes the target position from memory (given by a controller) and sends them to the dynamixels.
- Methods used for initialisation :
Run the hardware interface node, we run the ROS loop in a separate threads as external calls, such as service callbacks loading controllers, can’t block the control loop. It creates the hardware interface specific to your robot :
- retrieve configuration from rosparam
- initialize the hardware and interface it with ros_control
- Start the control loop
- wait until shutdown signal received