mdtool encoder command <ID>
This command is useful when one wants to measure the position of the actuator in the current setup
(without writing a custom script). A er the command is executed the screen shows the current position of
the actuatorʼs sha and it does so until you press Ctrl + C.
4.3. CANdle ROS/ROS2 nodes
TL;DR:
MD80 x CANdle - ROS/ROS2 startup guide
While C++ API is the most flexible way of inter
facing with CANdle/MD80, ROS/ROS2 APIs are also available.
These have been designed as standalone C++ nodes that use the CANdle library on the backend. The nodes
are designed to be used with already configured drives, thus functions such as setting FDCAN parameters are
unavailable via ROS/2 API. We recommend configuring all drives first using MDtool or C++/Python API.
Nodes use ROS/2 services to perform initialization and enable/disable the drives.
The initialization services available are:
/add_md80s
/zero_md80s
/set_mode_md80s
There are also two additional services for enabling/disabling the drives:
/enable_md80s
/disable_md80s
Once the drives are enabled via `
enable_md80s
` service, the nodes will ignore all calls to services other
than `
disable_md80s
`.
When enabled, communication switches from service-based to topic-based. The nodes will publish to the
topic:
/md80/joint_states
And will subscribe to topics:
/md80/motion_command
/md80/impedance_command
/md80/velocity_pid_command
/md80/position_pid_command
Quick startup guide - ROS
Letʼs run a simple example of the candle ROS node. In order to run the node, clone it into your local ROS
workspace in the src folder. A er that, build it with 'catkin' and run using the 'rosrun' command. Be sure to
source your workspace with
source devel/setup.sh
prior to running the package, and in each new terminal
window you're going to send commands related to the node.
First, start the roscore with the
roscore
command. Then run the node with arguments that fit your MD80 x
CANdle setup. The general syntax is:
rosrun candle_ros candle_ros_node <BUS> <FDCAN baud>
www.mabrobotics.pl