|Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.|
Model file conversionDescription: This tutorials is for adding new robots and environments models and model conversion
Tutorial Level: INTERMEDIATE
Write own your model files
Write own your model files as VRML file
Model conversion in RTM-ROS system
VRML, COLLADA, Euslisp, URDF
rtmros_common provides functionality for converting VRML model files into COLLADA, Euslisp, and URDF model files.
- export-collada in the openhrp3 package performs VRML => COLLADA conversion.
- The euscollada package provides COLLADA => Euslisp conversion.
Converting VRML files to Euslisp files
Change directory into your catkin workspace source folder:
Create a new package for converting VRML files into Euslisp files. Our package will depend on the hrpsys_ros_bridge package:
catkin_create_pkg robot_model_converter hrpsys_ros_bridge
Create a models folder in our package to hold our robot model files:
cd robot_model_converter mkdir models
Copy your robot VRML file and YAML file into the models folder:
cp <robot VRML file> models/robot.wrl cp <robot YAML file> models/MyRobot.yaml
Edit the CMakeList.txt to include the following line:
Now we're ready to make the package:
cd ~/catkin_ws catkin_make
If you inspect the model folder, you will find a set of files generated, including the myrobot.l Euslisp file converted from the VRML file.
The Euslisp file can then be loaded by executing:
cd ~/catkin_ws/src/robot_model_converter/models rosrun roseus roseus myrobot.l > myrobot > objects *myrobot*