Skip to content

Latest commit

 

History

History
124 lines (122 loc) · 6.66 KB

tm_foxy_extension.md

File metadata and controls

124 lines (122 loc) · 6.66 KB

Related Projects and Tutorials Usage

§ ROS2 driver usage

After the user has set up the ROS2 environment (example : Debian packages for ROS 2 Foxy) and built the TM driver based on the specific workspace, please enter your workspace <workspace> by launching the terminal, and remember to make the workspace visible to ROS.

source /opt/ros/foxy/setup.bash
cd <workspace>
source ./install/setup.bash

💡 Do you prepare the TM Robot ready ? Make sure that TM Robot's operating software (TMflow) network settings are ready and the Listen node is running.

Then, run the driver to test whether the complete communication interface is properly working with TM Robot by typing

ros2 run tm_driver tm_driver robot_ip:=<robot_ip_address>

Example :ros2 run tm_driver tm_driver robot_ip:=192.168.10.2, if the <robot_ip_address> is 192.168.10.2

Now, the user can use a new terminal to run each ROS node or command, but don't forget to source the correct setup shell files as starting a new terminal. Note: When you finish executing your developed scripts or motion commands through the TM ROS driver connection, press CTRL + C in all terminal windows to shut everything down.

§ Usage with MoveIt2-foxy (2.2.3)

See MoveIt2 tutorial to install the MoveIt2 packages.

If you plan to use MoveIt, it is recommended to install and use Cyclone DDS.

sudo apt install ros-$ROS_DISTRO-rmw-cyclonedds-cpp
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

The <MoveIt_WS> means the MoveIt2 workspace, for example ws_moveit2 .
The <tm2_ws> means TM driver workspace, for example tm2_ws .

To build MoveIt2

cd ws_moveit2
colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release

Assuming that the user is ready to build MoveIt2, and the user wants to apply the MoveIt by TM Robot, please do'nt forget to source the MoveIt environment, or you can add source <MoveIt_WS>/install/setup.bash to your .bashrc.
Then to build the TM driver based on the <tm2_ws> workspace, please enter the specific workspace tm2_ws by launching the terminal, and remember to make the workspace visible to ROS.

source /opt/ros/foxy/setup.bash
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
cd ~/tm2_ws
source ~/ws_moveit2/install/setup.bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
source ./install/setup.bash

💡 If you have built the TM driver before, it is recommended that you delete the build, install and log folders by the command rm -rf build install log, and rebuild it. For example,

source /opt/ros/foxy/setup.bash
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
cd ~/tm2_ws
rm -rf build install log
source ~/ws_moveit2/install/setup.bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
source ./install/setup.bash

The demo launches the RViz GUI and demonstrates planning and execution of a simple collision-free motion plan with TM Robot.
💡 Do you prepare the TM Robot ready ? Make sure that TM Robot's operating software (TMflow) network settings are ready and the Listen node is running.

  • To bring up the MoveIt2 demo environment in simulation mode with the virtual TM Robot, by typing
ros2 launch tm_moveit_cpp_demo <tm_robot_type>_run_moveit_cpp.launch.py

The prefix <tm_robot_type> means the TM Robot type, available for tm5s, tm7s, tm12s, tm14s, and tm25s models.

Taking the TM12S robot as an example, use the commands introduced above, by typing

ros2 launch tm_moveit_cpp_demo tm12s_run_moveit_cpp.launch.py

Note: When you are finished, press CTRL + C in all terminal windows to shut everything down.
The package tm_move_group provides a launch configuration for running a MoveGroup setup. The user can start planning and executing motions using the RViz MotionPlanning display.
💡 Do you prepare the TM Robot ready ? Make sure that TM Robot's operating software (TMflow) network settings are ready and the Listen node is running.

  • To bring up the MoveIt2 - MoveGroup demo in simulation mode with the virtual TM Robot, by typing
ros2 launch tm_move_group <tm_robot_type>_run_move_group.launch.py

The prefix <tm_robot_type> means the TM Robot type, available for tm5s, tm7s, tm12s, tm14s, and tm25s models.

Taking the TM12S robot as an example, use the commands introduced above, by typing

ros2 launch tm_move_group tm12s_run_move_group.launch.py
  • The user can also manipulate the real TM Robot to run, by typing
ros2 launch tm_move_group <tm_robot_type>_run_move_group.launch.py robot_ip:=<robot_ip_address>

⚠️[CAUTION] This demo will let the real TM Robot move, please be careful. If the user are a beginner or unfamiliar with the arm movement path, it is recommended that the user place your hand on the big red emergency Stick Stop Button at any time, and press the button appropriately in the event of any accident that may occur.

Taking the TM12S robot as an example, use the commands introduced above, by typing

ros2 launch tm_move_group tm12s_run_move_group.launch.py robot_ip:=<robot_ip_address>

The parameter <robot_ip_address> means the IP address of the TM Robot.

Note: When you have finished, press CTRL + C in all terminal windows to shut everything down.
📑 Note1: There are several built-in TM Robot nominal robot model settings, available for TM5S, TM7S, TM12S, TM14S, and TM25S models.
📑 Note2: TM Robot set the default to read the Xacro file, such as TM5S model, to read the file tm5s.urdf.xacro into robot_description or such as TM12S model, to read the file tm12s.urdf.xacro into robot_description. If the user wants to use the specific model parameters instead of the nominal model to control the robot, please go back to the section 6. Generate your TM Robot-Specific Kinematics Parameters Files to modify the Xacro file.
📑 Note3: Running two tm ros drivers at the same IP address is not allowed. Since the tm driver node has been written into the moveit launch file, there is no need to execute ros2 run tm_driver tm_driver robots_ip:=<robot_ip_address>.