![Mab Robotics MD80 x CANdle Скачать руководство пользователя страница 29](http://html1.mh-extra.com/html/mab-robotics/md80-x-candle/md80-x-candle_user-manual_3150547029.webp)
Set mode
Next
the
desired
control
mode
should
be
selected.
This
is
accomplished
with
/candle_ros2_node/set_mode_md80s
service.
For example:
ros2 service call /candle_ros2_node/set_mode_md80s candle_ros2/srv/SetModeMd80s "{drive_ids: [200,
800], mode:["IMPEDANCE", "IMPEDANCE"]}"
Should produce:
response:
candle_ros2.srv.SetModeMd80s_Response(drives_success=[True, True])
Informing that for both drives mode has been set correctly.
Set Zero
O en when starting, setting a current position to zero is desired. This can be accomplished with a call to
/candle_ros2_node/zero_md80s
service.
ros2 service call /candle_ros2_node/zero_md80s candle_ros2/srv/GenericMd80Msg
"{drive_ids:[200,800]}"
Enabling/Disabling drives
Using services
/candle_ros2_node/enable_md80s
and
/candle_ros2_node/disable_md80s
the drives and the
node publishers and subscribers can be enabled/disabled.
NOTE: A er calling
/candle_ros2_node
/enable_md80s
service, no calls to services other than
/candle_ros2_node/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 drivie ID, for
example, 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.
ros2 service call /candle_ros2_node/enable_md80s candle_ros2/srv/GenericMd80Msg "{drive_ids:[200,
800]}"
ros2 service call /candle_ros2_node/disable_md80s candle_ros2/srv/GenericMd80Msg "{drive_ids:[200,
800]}"
Controlling drives
Controlling the drives is done via the four topics listed above. For commands to be viable, all field of each
message must be filled properly. For example, to set up custom gains for IMPEDANCE mode use:
ros2 topic pub /md80/impedance_command candle_ros2/msg/ImpedanceCommand "{drive_ids: [200,
800], kp: [1.0,1.0]], kd: [0.001,0.001], max_output: [1.0, 1.0]}"
www.mabrobotics.pl