ROS Framework for the Precision Assembly Robot
pm_hardware_interface: Contains the hardware interface for the precision assembly robotpm_robot_control: Contains the control of the robot via OPC UApm_robot_bringup: Contains the launch files to bringup the robot in real or simulationpm_robot_control_test: Contains a nodes to sample nodes to control the robotpm_robot_description: Contains the description of the robotpm_robot_moveit_config: Contains the moveit configpm_robot_submodules: Contains submodules for e.g. Basler cameras
Start by changing directory to your workspace!
git clone https://github.com/match-PM/match_pm_robot.git
Make sure that you have installed the following packages:
sudo apt install ros-humble-desktop-full
sudo apt install ros-humble-xacro
sudo apt install ros-humble-moveit
sudo apt install ros-humble-moveit
sudo apt install ros-humble-moveit-visual-tools
sudo apt install ros-humble-graph-msgs
sudo apt install ros-humble-ros2-control ros-humble-ros2-controllers
sudo apt install ros-humble-gazebo-ros2-control
sudo apt install ros-humble-gazebo-ros-pkgs
sudo apt install ros-humble-rqt*
ros2 run rqt_joint_trajectory_controller rqt_joint_trajectory_controller --force-discover
Add these commands to the .bashrc file:
source /opt/ros/humble/setup.bash
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash
source ~/ros2_ws/install/setup.bash
Use your standard build tools to build the downloaded packages e.g. :
colcon build --symlink-install
In the package pm_robot_bringup, you can find two launch files. You can launch the robot in a simulation environment or use the real robot. You can define the robot configuration (Gonimeter, Gripper, etc.) into the launch files.
To use the real hardware (robot), the robot has to be switched on.
ros2 launch pm_robot_bringup pm_robot_real_HW.launch.py
There are two simulations. One in Unity and one in Gazebo. The Unity Simulation encompasses all functions of the real robot, including sensors (camera, laser, force sensor). It requires you to install unity.
The Gazebo simulation is easier to use, but does not have every functionality.
Using the gazebo simualtion, the robot is spawned in gazebo. You can control the robot axis via joint_trajectory_controller. To plan trajectories, you can use Moveit.
ros2 launch pm_robot_bringup pm_robot_sim_HW.launch.py
For the unity simulation you need the install the repro https://github.com/match-PM/match_pm_robot_unity.git
To start the simulation, do the following:
- Start the opcua-server
ros2 run opcua_server opcua_server
-
Start the unity simulation by enter the play mode
-
Start ros2
ros2 launch pm_robot_bringup pm_robot_unity_HW.launch.py
ROS 2 - Humble - Documentation and Tutorial Building a robot with ROS2