The MobileTrunk's robot prefab for SoftRobots.
- Requirement
- Compile sofa
- Install Required dependencies
- Download and set up working space
- Install ROS and set up working space
- Launch test
- Connecting the digital twin to the physical robot
- License
This prefab was developed as part of the SOMOROB project. The goal is to integrate a deformable robotic trunk (softrobot) on a 4-wheeled mobile robot base equipped with a LIDAR and to develop its digital twin equivalent. The deformable trunk is a project Echelon 3 developed by the Defrost team at INRIA. The mobile base is developed by the company Robotnik automation
For that follow these instructions (We will install the linux one)
For that follow these instructions (We will install the linux one) (The best way to add plugin to SOFA is explained here)
-
STLIB
foo@bar:~$ git clone https://github.com/SofaDefrost/STLIB.git
-
SoftRobots
foo@bar:~$ git clone https://github.com/SofaDefrost/SoftRobots.git
-
SofaPython3
foo@bar:~$ git clone https://github.com/sofa-framework/SofaPython3
-
BeamAdapter
foo@bar:~$ git clone https://github.com/SofaDefrost/BeamAdapter
Now that you have a compiled & working SOFA with the required plugins, we can clone prefab.MobileTrunk repository.
-
Create a directory where you will put it
-
Move into it and clone the last working version
foo@bar:~$ git clone https://github.com/CRIStAL-PADR/prefab.MobileTrunk
Open your bashrc and add the following lines in order to setup your working space
-
Add to the PATH the path to the bin folder contained in the SOFA build folder
export PATH="/path to buid folder/build/bin:$PATH"
-
Tell to SOFA_ROOT the path where to find the path to the buid folder of SOFA
export SOFA_ROOT=/path to buid folder/build
-
Tell to SOFAPYTHON3_ROOT where to find the path to the plugin SofaPython3
export SOFA_ROOT=/path to SofaPython3 plugin folder/SofaPython3
-
Make an alias in order to be able to launch Sofa easily by doing a runSofa
runSofa="/path to buid folder/build/bin/runSofa"
-
Add to the PYTHONPATH the path to STLIB
export PYTHONPATH=$PYTHONPATH:/path to build folder/build/lib/python3/site-packages:/path to STLIB plugin folder/STLIB/python3/src:/usr/local/lib/python3.8/dist-packages
The digital twin has a ros2 interface while the mobile platform (summit_xl) has a ros1 interface. It is possible to be able to link the digital twin to the real robot using rosbridge.
Install the [noetic](http://wiki.ros.org/noetic/Installation/Ubuntu) version for ros1 in order to
be able to use rosbridge
Install the [foxy](https://docs.ros.org/en/foxy/Installation.html) version for ros2.
If you are new to ros you can follow the [tutorials](https://docs.ros.org/en/foxy/Tutorials.html)
before continuing
Install rosbridge
```console
foo@bar:~$ sudo apt-get install -y ros-foxy-ros1-bridge
```
Open your bashrc and add the following lines in order to setup your working space for ros
-
Create an alias for noetic(ros1) and foxy(ros2) in order to be able to source your terminal more easily
alias foxy="source /opt/ros/foxy/setup.bash" alias noetic="source /opt/ros/noetic/setup.bash"
-
Add to PYTHONPATH the path to sofaros api
export PYTHONPATH=$PYTHONPATH:/path to SoftRobot plugin folder/SoftRobots/docs/sofapython3/examples/sofaros
To confirm all the previous steps and verify that the prefab is working properly you can :
-
Launch the summit_xl.py SOFA scene situated in prefab.MobileTrunk/mobile_trunk_sim by doing:
foo@bar:~$ runSofa summit_xl
-
If everything went well you should see the GUI Sofa with the digital twin of
-
Then with your keyboard send velocity and orientation command to the Sofa scene in order to see the robot move.
-
source your terminal using :
foo@bar:~$ foxy
-
Go to the directory where the prefab.MobleTrunk/mobile_trunk_sim folder is located and run the following command:
foo@bar:~$ runSofa ros_summitxl.py
-
Open a new terminal then source it as before then execute the commands to the following command:
foo@bar:~$ colcon build && . install/setup.bash && foxy
-
You can now launch the keyboard controller to interact with the robot in the simulation
foo@bar:~$ ros2 run summitxl summitxl_teleop_key
-
If everything went well you should see this appear in the terminal
Creative Commons Zero v1.0 Universal see LICENSE