Integration of ROS2 for Mitsubishi 6DOF robots, supporting Melfa RV-FR Series robots.
This driver is provided by Adiro.com in collaboration with Software-byTS
Important
At the moment just two models, RV-2FR-D and RV-4FRL-D, are supported by this driver. The driver is tested and executable with the Humble distribution from ROS2 and MoveIt2. We recommend you use the same setup.
You can either integrate the driver to your natively installed ROS/Moveit workspace or use our provided docker container to test it with your robot and get familiar with it.
If you are using the driver natively, you have to figure out the IP-Address of your Robot (ROBOT-IP) and Host computer (HOST-IP). Change these values manually in the code of the driver. Now you are also able to control your real robot.
You can also delete all docker relevant files if you are running the driver natively on your system.
In case you choose our docker container, the following guide will help you to get started.
First download and install the latest version of Docker-Desktop. You maybe need to check the installation guide provided by Docker Inc. or admin rights for your PC to use it.
After that, open your preferred text editor or IDE (we will be using Visual Studio Code for the next steps) and clone the repository.
The next step is to type in the IP of your robot and your host IP. For that you need to open the file docker-compose.yml and modify the environment variables ROBOT_IP (Line 39) and HOST_IP (Line 42).
All done, now we can start our docker container. Don't forget to run the Docker-Desktop app. in the background.
Now, you can either use a docker extension, the provided PowerShell script (start.ps1) or type in this command in the terminal:
Without GPU support
docker compose up -d
NVIDIA GPU support
docker-compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
Dockers is now starting to build the containers, this may take approximately 10 to 20 minutes. Your docker container should now be running. The next step is to open up the UI from our container.
Open this Page with NoVNC and you should see a empty linux UI.
Next, we open up the bash inside the container. Again, you have a couple of options to do this, e.g. try the PowerShell script (attach.ps1) or type in this command:
docker exec -it ros2-mitsubishi-moveit bash
Inside the bash-shell, you can now start to simulate or connect to your real robot.
But before that, it's important that you add the host- and robot-IP!
And remember, if you are changing files you have to build the workspace in the container again:
colcon build
To start up your Mitsubishi robot in Gazebo and RViz, type in the following shell command:
ros2 launch mitsubishi_ros2_gazebo robot_sim_moveit.launch.py robot:=rv_2frb_d
This command starts up the Melfa RV-2FR-D robot, if you want to use the RV-4FRL-D change the last parameter like this ->
robot:=rv_4frl_d.
You can now start to test the robot in the simulation.
Warning
Make sure you operate the robot in a save and collsion-free environment!
To control your robot directly e.g. with RViz, must to establish a connection to the robot controller.
First, load the program REAL out of the MELFA_Program folder onto your robot controller. Change the IP address in line 28 and start the program.
The robot will drive in a start position and wait for new input.
You are now able to control your robot controller via ROS. You should also see the symbol of a running program on your Teaching Box, e.g. the R56TB:
We test the connection by starting RViz again and adding the robot IP as a parameter:
ros2 launch rv_2frb_d_moveit_config robot.launch.py robot_ip:=YOUR-IP...
You should now be able to see the robot in RViz. Remember to set the velocity and acceleration appropriate to the environment of your robot!
Now, you can start testing to move your robot in RViz or write your own nodes/programs.
You can simply type in exit to get out of the bash shell and the container, and to stop the docker container you type in this command:
docker compose down
Important
Make sure to shut down the docker container properly to prevent any problems with Docker-Desktop.
Every container should now be stopped and you can close docker desktop as well.