Examples are valid for:
TMflow Software version: 2.16 or above.
TM Robot Hardware version: HW3.2 or above
ROS Version : ROS 2 Foxy
Note that older or newer software versions may have different results.
Overview #
Robot Operating System (ROS) is an open-source robotics middleware suite including rich libraries, drivers, and tools, intended to help build robot applications more efficiently. To support ROS, Techman Robot presents TM ROS Driver so that developers can build ROS-based applications with TM Robot by motion control and data acquisition (status, images from EIH camera, etc.).
You can visit our GitiHub (https://github.com/TechmanRobotInc), clone the required TM ROS Driver repository onto the working directory. Here is a summary of different versions of TM ROS Driver according to different ROS versions and TMflow versions :
This technical document is written based on the driver TM2 ROS2 Foxy, TMflow 2.16
Getting Ready on TMflow #
Before using the TM ROS Driver, users need to ensure the robot is configured properly.
1. Network setting
Connect your computer and the robot with an Ethernet Cable. On the robot, go to System –> Network Setting. Enable and set the Static IP so that all devices share the same LAN.
2. Ethernet Slave
To publishes ROS topics (such as feedback_states), TM ROS driver requires to access data from Ethernet slaves on the robot; therefore, users need to configure it properly before using TM ROS Driver.
First, download the corresponding data table transmit file (Data_Table_Setting_TM2_ROS_Default.xml), place it onto a USB device (under the following path: \TM_Export\{folder}\EthSlave\Transmit) and import to the robot.
Then, go to Configuration –> Connection –> Ethernet Slaves –> Data Table Setting. Open the transmit file, save and then enable the Ethernet Slave.
3. Listen Node (Optional)
To use ROS service for robot motion control, it requires to run Listen Node on the robor project. For example, build a flow project as below and run it.
Basic Usage of TM ROS Driver #
First of all, set the correct Static IP on your computer to make sure it share the same LAN with the robot. You can ping the robot IP and check the connection.
Make sure your computer has been set up with the ROS 2 environment (for example: Debian packages for ROS 2 Foxy). To build the TM ROS Driver repository, open the terminal at the target workspace.
Then, run the driver and connect to the robot,
In this example, since the robot IP is 192.168.10.2, the command should be ros2 run tm_driver tm_driver robot_ip:=192.168.10.2
To check if the TM ROS Driver works properly, you can open a new workspace terminal and try the command ros2 topic list.
Once the TM ROS Driver works, you can start running your program that subscribes TM ROS topics or requests TM ROS services. For more detail, please visit Techman Page on GitHub.