This stack includes ros2_control drivers for the Mitsubishi RV1A robotic manipulator.
- integration with
ros2_control - integration with Gazebo
- integration with Moveit2
mrv1a_bringup- launch and run-time configurationsmrv1a_description- robot description and configuration filesmrv1a_hardware- hardware interfaces for communication with the robotmrv1a_moveit2- some tools for Moveit2 integration
Required setup : Ubuntu 20.04 LTS
- Install
ros2packages. The current developpment is based ofros2 galactic. Installation steps are decribed here. - Source your
ros2environment:NOTE: The ros2 environment needs to be sources in every used terminal. If only one distribution of ros2 is used, it can be added to thesource /opt/ros/galactic/setup.bash~/.bashrcfile. - Install
colconand its extensions :sudo apt install python3-colcon-common-extensions
- Create a new ros2 workspace:
mkdir ~/ros2_ws/src - Pull relevant packages, install dependencies, compile, and source the workspace by using:
cd ~/ros2_ws git clone https://github.com/ICube-Robotics/mrv1a_ros2.git src/mrv1a_ros2 rosdep install --ignore-src --from-paths . -y -r colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install source install/setup.bash
The mrv1a_bringup package contains the follwing launchers :
mrv1a.launch.py- is the main launcher giving access to all feaures of the driver.
The arguments for launch files can be listed using
ros2 launch mrv1a_bringup <launch_file_name>.launch.py --show-argsThe most relevant arguments of mrv1a.launch.py are:
runtime_config_package(default: "mrv1a_description") - name of the package with the controller's configuration inconfigfolder. Usually the argument is not set, it enables use of a custom setup.controllers_file(default: "mrv1a_controllers.yaml") - YAML file with the controllers configuration.description_package(default: "mrv1a_description") - Description package with robot URDF/xacro files. Usually the argument is not set, it enables use of a custom description.description_file(default: "mrv1a.config.xacro") - URDF/XACRO description file with the robot.prefix(default: "") - Prefix of the joint names, useful for multi-robot setup. If changed than also joint names in the controllers' configuration have to be updated.use_sim(default: "false") - Start robot in Gazebo simulation.use_fake_hardware(default: "true") -Start robot with fake hardware mirroring command to its states.robot_controller(default: "mrv1a_arm_controller") - Robot controller to start.start_rviz(default: "true") - Start RViz2 automatically with this launch file.robot_ip(default: "192.168.122.200") - Robot IP.robot_port(defaut: "10000") - Robot port.initial_positions_file(default: "initial_positions.yaml") - Configuration file of robot initial positions for simulation.
HINT: list all loaded controllers using ros2 control list_controllers command.
NOTE: The package can simulate hardware with the ros2_control FakeSystem. This is the default behavior. This emulator enables an environment for testing of "piping" of hardware and controllers, as well as testing robot's descriptions. For more details see ros2_control documentation for more details.
- Start the simulated hardware, in a sourced terminal run
add the parameter
ros2 launch mrv1a_bringup mrv1a.launch.py
use_fake_hardware:="false"to control the real robot. - Send joint trajectory goals to the hardware by using a demo node from ros2_control_demos package by running
ros2 launch mrv1a_bringup mrv1a_test_joint_trajectory_controller.launch.py
After a few seconds the robot should move.
ICube Laboratory, University of Strasbourg, France
Maciej Bednarczyk: m.bednarczyk@unistra.fr, @github: mcbed
