![Mab Robotics MD80 x CANdle User Manual Download Page 27](http://html1.mh-extra.com/html/mab-robotics/md80-x-candle/md80-x-candle_user-manual_3150547027.webp)
rosservice call /zero_md80s "{drive_ids:[200, 800]}"
Enabling/Disabling drives
Using services
/enable_md80s
and
/disable_md80s
the drives and the node publishers and subscribers can
be enabled/disabled.
Note: A er calling
/enable_md80s
service, no calls to services other than
/disable_md80s
should be
done.
A er enabling, the node will publish current joint states to
/joint_states
at a frequency dependent on a
currently chosen communication bus and speed mode. Joint names are generated based on drive ID, for
example, a drive with id 546 will be called
Joint 546
.
The node will also listen for the messages on topics for controlling the drives. All of the above topics are
listened to all the time, but currently applied settings are dependent on the md80 mode set before enabling.
rosservice call /enable_md80s "{drive_ids:[200, 800]}"
rosservice call /disable_md80s "{drive_ids:[200, 800]}"
Controlling drives
Controlling the drives is done via the four topics listed above. For commands to be viable, all fields of each
message must be filled properly. For example, to set up custom gains for IMPEDANCE mode use:
rostopic pub /md80/impedance_command candle_ros/ImpedanceCommand "{drive_ids:[200, 800],
kp:[0.25, 1.0], kd:[0.1, 0.05], max_output:[2.0, 2.0]}"
Example set up of custom gains for POSITION PID mode:
rostopic pub /md80/position_command candle_ros/PositionPidCommand "{drive_ids: [200, 800],
position_pid: [{kp: 40.0, ki: 0.5, kd: 0.0, i_windup: 10, max_output: 3.0},{kp: 20.0, ki: 0.5, kd: 0.0, i_windup:
10, max_output: 3.0}], velocity_pid: [{kp: 0.2, ki: 0.3, kd: 0.0, i_windup: 2.0, max_output: 2.0}, {kp: 0.1, ki:
0.1, kd: 0.0, i_windup: 1, max_output: 2.0}]}"
Example set up of custom gains for VELOCITY PID mode:
rostopic pub /md80/velocity_command candle_ros/VelocityPidCommand "{drive_ids: [200, 800],
velocity_pid: [{kp: 0.2, ki: 0.3, kd: 0.0, i_windup: 2.0, max_output: 2.0}, {kp: 0.1, ki: 0.1, kd: 0.0, i_windup: 1,
max_output: 2.0}]}"
Setting desired position, velocity, and torque is done via
/md80/motion_command
topic. Note that for it to
take effect, all fields in the message should be correctly filled. For example, to move the drives in impedance
mode, it is possible to use the following command
rostopic pub /md80/motion_command candle_ros/MotionCommand "{drive_ids:[81,97],
target_position:[3.0, -3.0], target_velocity:[0.0, 0.0], target_torque:[0, 0]}"
www.mabrobotics.pl