-
Notifications
You must be signed in to change notification settings - Fork 21
Tutorial Simulation Scene Objects
This tutorial covers topics in relation with simulation objects, called scene objects which can be static objects (objects rigidly fixed on the robot workspace) or dynamic objects (objects with witch the robot can interact, i.g. pick, place, push ...etc), that can be considered in the motion planing for a collision free interpolation. This document covers specifically:
- Static Objects:
- Preparatin of scene objects CAD files
- Set up of scene objetcs through the MoveIt Rviz panel
- Loading of default simulation scene
- Dynamic Objects:
- Programatic insertion/deletion of scene objects
Rviz and MoveIt allow only for .stl
or .dae
file formats, this are both human readable files that define a 3D meshes. In this tutorial we will use .stl
files which requires some preparation before importing to ROS.
STL files do not have units by definition but most 3D modeling softwares export meshes in Milimiters, since ROS uses Meters as default unit of measurment, importing this files directly will lead to enormous 3D meshes. This is why we need to scale the .stl
files initially to have units of Meters and a origin point in a desired location; for this it is recomended to use Autodesk Print Studio (a free software that allows scaling and translation of mesh before the generation of the stl).
In this tutorial we are going to use the file structure.stl located in the invite_motoman_moveit_config/scenes/STL
folder.
First launch the robot demo file.
roslaunch invite_motoman_moveit_config demo.launch
Then in the MoveIt Motion Planning panel open the Scene Objects window and click on the import file button on the bottom left part of the panel and select the structure.stl
file, the mesh will be imported and in the pannel the position and orientation can be modified (scaling is not recomended with this pannel since scaling of STL files do not mantain the origin of the mesh relative to itself).
Modify the position of the structure to familiarize yourself with the panel, and then remove the mesh by clicking the remove button.
A default group of scene objects is already setup for easy loading and use; to load it on the Scene Objects window press the Import from text button, then find the invite_motoman_moveit_config/scenes/default_scene_objects.scene
file, once loaded you should get a result like the one shown below.
It is also possible to load objects to the robot scene directly from the source code, for this purpose a folder should be created where the CAD files of the objects must be saved.(invite_motoman_beginner_tutorials/meshes/
).
The code for loading objects is in the file objects.cpp, where you can adjust the position and orientation of the object as you required, in addition, a vector is used for scales the object appropriately allowing you to directly load the models generated by CAD software writing the path where it is located. Execute the launch of our robot "demo.launch", and after execute the next line
rosrun invite_beginner_tutorials objects
In this case a glass has been loaded in the scene
Invite-Robotics
-
Tutorials