matlabbe / rtabmap_drone_example

Example of using move_base with mavros/px4 and rtabmap visual SLAM
BSD 3-Clause "New" or "Revised" License
103 stars 24 forks source link

Generating the custom world #12

Open aaravrav142 opened 1 year ago

aaravrav142 commented 1 year ago

Hi How do I generate my own simulation world? I have an iPad Pro Lidar. Is it okay to use the PLY file from the rtabmap iPad app to generate the map and then export it in the gazebo for use with a ground robot simulation e.g a turtlebot ? What steps do I need to follow? Can you please explain? Thanks

matlabbe commented 1 year ago

You will have to convert the OBJ or PLY into a DAE file (collada). You can use MeshLab to do the conversion. You then need to create an SDF file including the DAE file for the scan in a models folder, then create a gazebo world file to include that model. To use paths in SDF file relative to package, edit package.xml and ad this: https://github.com/matlabbe/rtabmap_drone_example/blob/eaeeb6f723cd0b0307575d3969f2cb5df42f928e/package.xml#L76-L82

For ground robot, to make sure the ground is flat, a trick is to add an invisible ground plane at z=0 and lower the model for about 1-2 cm.

tulingcheng86 commented 5 months ago

You will have to convert the OBJ or PLY into a DAE file (collada). You can use MeshLab to do the conversion. You then need to create an SDF file including the DAE file for the scan in a models folder, then create a gazebo world file to include that model. To use paths in SDF file relative to package, edit package.xml and ad this:

https://github.com/matlabbe/rtabmap_drone_example/blob/eaeeb6f723cd0b0307575d3969f2cb5df42f928e/package.xml#L76-L82

For ground robot, to make sure the ground is flat, a trick is to add an invisible ground plane at z=0 and lower the model for about 1-2 cm.

Hello, is there any way to convert ply files to OBJ or DAE files? I tried meshlab, but not using it very well results in conversions. Please it would be better if there is a tutorial or software for conversion, thank you

matlabbe commented 5 months ago

Just select DAE when exporting like in this video: https://youtu.be/37E1iHAJp24?si=1ODDCLea7IoAWQp1

tulingcheng86 commented 5 months ago

Just select DAE when exporting like in this video: https://youtu.be/37E1iHAJp24?si=1ODDCLea7IoAWQp1

THANKS