This is a ros2 example by using techman robot and robotiq.
There are two ways to install and build this package. The first in using Docker and the other install the environment directly on your own computer. I suggest to use Docker to create environment and package.
The easiest way to get started is using Docker. The Docker install steps are here
- Install Docker.
- Change to superuser user by type
sudo -i
- Create the workspace and download source files
mkdir -p ~/jufeng_tm_ws/src
cd ~/jufeng_tm_ws/src
git clone https://github.com/JuFengWu/techman_robot_grasp_ros2.git
- Build docker images by type
cd ~/jufeng_tm_ws/src/techman_robot_grasp_ros2
docker build -t techman_robot_grasp_ros2:ver1 .
and wait for a moment.
- Type
docker run -it --rm -p 6080:80 techman_robot_grasp_ros2:ver1
- Open a broswer and connect to localhost:6080, you can see the desktop on the broswer(which is remote desktop) with this package environment and this package.
- Build the project on the remote desktop by opening the remote desktop terminal and type
cd ./tm_ros2_ws
colcon build
This package use the following dependent tools:
- ROS2 Dashing
- ROS1 Melodic
- Gazebo 9
- Moveit ROS1 Melodic version
After install those dependent tools and you can start to build this package by following steps:
- Create the workspace and download source files
mkdir -p ~/jufeng_tm_ws/src
cd ~/jufeng_tm_ws/src
git clone https://github.com/JuFengWu/techman_robot_grasp_ros2.git
- Build this project and source it
source /opt/ros/dashing/setup.bash
cd ~/jufeng_tm_ws
colcon build
source install/setup.bash
Rviz is a powerful robot simulator in Ros. Current it have ros2 version and sometimes it is called Rviz2.
The Rviz in Ros2 is almost the same as Ros1, so if you used Rviz in Ros1 before, it is easy to get start!
You can launch rviz2 and show the robot and griiper just type
ros2 launch tm_launch tm_rviz_joint_state.launch.py
you can see techman robot move in rviz
Gazebo is a powerful simulator with high-performance physics engines and because its physics engines it is a good data creator. The difference between Gazebo and Rviz is that Gazebo is a robot status data creator and Rviz is a data receiver to show up the robot status.
You can launch Gazebo and show the robot and griiper just type
ros2 launch tm_launch tm_gazebo_move.launch.py
you can see techman robot stand in gazebo environment
You can send command to gazebo by typing
ros2 run tm_driver send_tm_command
you can see techman robot run in gazebo environment
If you want to see the image from eye in hand camera, you can type
ros2 run tm_driver tm_get_img
you can see the image from the eye in hand camera
Moveit is a power path planning tool, but currently the Ros2 have only alpha version.
- Currently moveit recommand used in Ros1 envirnoment, so this demo use Ros1 and Ros2 bridge to connect Ros1 and Ros2. Make sure your computer have installed Ros1 Melodic.
- This test is not only use this project, but also use this project.
- Download this package and follow this instruction to build and install this project.
- Open a terminal and type
roslaunch moveit_action_pkg tm_movit_bringup.launch
- Open a new terminal to create ros2 ros1_bridge by typing those cmds
. /opt/ros/melodic/setup.bash
. /opt/ros/dashing/setup.bash
export ROS_MASTER_URI=http://localhost:11311
ros2 run ros1_bridge dynamic_bridge __log_disable_rosout:=true
- Open a new terminal and type
ros2 run tm_status get_trajectory
- You can see the third terminal show up the trajecoty which is calculated from the first terminal.