Demo RTAB-Map on Turtlebot

classic Classic list List threaded Threaded
66 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

jerry-qin
Hi,

Mr. Labbe

Thank you for your advise.The warn information did't appear after I set the wait_for_transform:=1.
However,when I test the Localization mode,how can I know a loop closure is found. And there is a warning

[ WARN] (2016-03-10 15:18:30.401) Rtabmap.cpp:1755::process() Rejected loop closure 119 -> 680: Cannot compute transform (cor=161 corrRatio=0.251563/0.300000)

[ INFO] [1457594293.341621348]: Resizing costmap to 101 X 78 at 0.050000 m/pix
[ INFO] [1457594294.385955205]: Got new plan
[ INFO] [1457594294.547960122]: rtabmap: Rate=1.00s, Limit=0.700s, RTAB-Map=0.0461s, Pub=0.0017s (local map=12, WM=12)
[ INFO] [1457594295.385798558]: Got new plan
[ INFO] [1457594295.540673317]: rtabmap: Rate=1.00s, Limit=0.700s, RTAB-Map=0.0331s, Pub=0.0021s (local map=12, WM=12)
[ INFO] [1457594295.540852969]: Resizing costmap to 153 X 126 at 0.050000 m/pix
[ INFO] [1457594296.385806499]: Got new plan

Finally,the robot will reach the target and then turn around constantly.
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

matlabbe
Administrator
Hi,

To know if a loop closure happens, either start demo_turtlebot_mapping.launch with argument "rtabmapviz:=true" (with loop closure view shown) or echo the msg rtabmap_ros/info on console (value not 0 means a loop closure):
$ rostopic echo /rtabmap/info/loopClosureId

On the console, you will have a warning when a loop closure is detected but rejected. This is what you are seeing, the loop closure is rejected because there are not enough matching points between the laser scans on the loop closure. You have two choices: 1-Decrease"LccIcp2/CorrespondenceRatio" (default 0.3), or 2- set "LccIcp/Type=0" and "LccBow/Force2D=true" to disable ICP refining:
<node name="rtabmap" type="rtabmap" pkg="rtabmap_ros">
...
<!-- in your case the loop would have been accepted if it this threshold was under 0.251563 -->
<param name="LccIcp2/CorrespondenceRatio" type="string" value="0.2"/> 
or
<param name="LccIcp/Type" type="string" value="0"/>       <!-- don't use ICP -->
<param name="LccBow/Force2D" type="string" value="true"/> <!-- keep the transform 2D -->
</node>
Note that a low number of correspondences on ICP produces often wrong transformations.

For the robot always rotating at goal, check the Navigation Tuning Guide:
"Trajectories are scored from their endpoints. This means that setting the sim_time parameter to different values can have a large affect on how the robot behaves. I normally set this parameter to between 1-2 seconds, where setting it higher can result in slightly smoother trajectories, making sure that the minimum velocity multiplied by the sim_period is less than twice my tolerance on a goal. Otherwise, the robot will prefer to rotate in place just outside of range of its target position rather than moving towards the goal."

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

jerry-qin
Hi,

Mr. Labbe

Thanks for your advise to the previous problem.These days I am doing the experiments about the 2D navigation only using kinect or Xtion. And I found serious problem which may cause the failure.

As show in the picture 1,I put the turtlebot in the center of house.Then I turned the robot to right in a small angle,but the edge of fake_laser in the rviz move to the left as shown in the picture 2.When I turned robot left,the edge in the rviz turned to right.When I was mapping,the map was always accumulating rotating clockwise.
I guess that it may be the matter of calibration of turtlebot? But there is a error information :Please point me at a wall.

Thanks For the Helps.



Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

matlabbe
Administrator
Hi,

Make sure that the fixed frame under Global options (top left) is set to "/map", otherwise the point cloud would not match the grid map.
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

jerry-qin
Hi,

Mr. Labbe

I am sure that my fixed frame under Global options is set to "/map",but is doesn't work.What should I do next?

Thanks for your reply!
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

matlabbe
Administrator
Can you show TF in RVIZ? (just add TF display) Also, can you show the TF tree using:
$ rosrun tf view_frames

cheers
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

jerry-qin
Hi,

Mr. Labbe

I add TF display in RVIZ as you can see in the picture.And the TF tree is listed.

the TF tree  frames.pdf

Thanks for your help!!

Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

Nick Hoo
In reply to this post by matlabbe
Hi,
How can I save 3D map?And how can I read the 3D map?

Regards,
Nick
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

matlabbe
Administrator
Hi,

Online:
1- you can save /cloud_map topic using pointcloud_to_pcd node. You will get a PCD file that can be opened with pcl_viewer (installed with PCL). The pcl_pcd2ply tool can be used to convert PCD to PLY so that it can be opened in any 3D software (like MeshLab).
2- If you have rtabmapviz opened, you can pause and do File->Export point clouds... You can export in PCD or PLY directly (default PLY).

Offline:
1- Open the database in rtabmap standalone: "$ rtabmap ~/.ros/rtabmap.db", then make sure you refreshed the map and do File->Export point clouds...

cheers
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

Nick Hoo
Thanks for your help. The second and third way are good use.
The first method,I run
$ rosrun pcl_ros pointcloud_to_pcd input:=/velodyne/pointcloud2
but the result is that I can't find the  location of the pcd file like 1285627014.833100319.pcd
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

matlabbe
Administrator
Hi,
with "rosrun", the cloud should be saved in the same directory where you called it. As in the documentation, you can set a prefix for the output file name, so you can specify the output folder:
Set the prefix parameter in the current namespace, save messages to files with names like /tmp/pcd/vel_1285627015.132700443.pcd.

$ rosrun pcl_ros pointcloud_to_pcd input:=/my_cloud _prefix:=/tmp/pcd/vel_
cheers
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

Nick Hoo
I got it, Thank you very much.
When I do the navigation experimrnt, can I show the line in the map after path planning,like the hector_slam.
Regards,
Nick
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

matlabbe
Administrator
Hi,

Do you mean showing the line of the planned path in RVIZ? Add a "Path" display in RVIZ and select the corresponding topic.

cheers
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

Nick Hoo
Thank you very much.
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

Nick Hoo
In reply to this post by matlabbe
Rtabmap can implement 3D point cloud projection to the 2D map, and navigate on costmap. If I want to navigate on the costmap, but use 3D information when avoiding obstacles (such as I have a low hollow table, four feet, the following is empty, Kinect can see the table. The robot can pass under the table, and can avoid the table leg), Rtabmap projects can realize it? 3Q
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

Nick Hoo
In reply to this post by matlabbe
Theses day, I did some experiments, and I had some questions.
1.Gloabl map in Rviz always display error statu.
2.After the theme of the subscription is changed to the /octomap_proj, turtlebot movement is not smooth, often stuck do not go
3.When the turtlebot is in navigation, I specify a target point through navigation 2D in Rviz. In the process of moving, the robot updates the map, But the target point is above the expansion area of the obstacle after updating the map. Then the turtlebot is stuck.
4.The turtlebot can not avoid the 2 part of the stool, but it can avoid 1 part of the stool.
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

matlabbe
Administrator
In reply to this post by Nick Hoo
Hi,

You can set a maximum height of the projected cloud so that the robot can pass under the table while avoiding the table legs.

(v0.11.8)
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap">
   <param name="proj_max_obstacles_height" type="double" value="1.0"/> <!-- 1 meter max -->
</<node>

(v0.11.10)
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap">
   <param name="Grid/MaxObstacleHeight" type="string" value="1.0"/> <!-- 1 meter max -->
</<node>

cheers
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

matlabbe
Administrator
In reply to this post by Nick Hoo
Hi,

1. The costmap or the map? What is the error status?
2. /octomap_proj requires to build a 3D OctoMap, so it requires a lot more processing power (3D ray tracing). If your environment is static, you may want to disable current cloud integration to OctoMap to save some computation power:
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap">
   <param name="map_negative_poses_ignored" type="bool" value="true"/> 
   [...]
</<node>
3. If an obstacle appears on the goal, move_base will fail planning.
4. See your local costmap parameters. In particular for this Turtlebot demo, I think only a fake laser scan from the kinect is used for the local costmap. The part 2 of the chair is quite difficult to detect though even with a rtabmap_ros/obstacles_detection nodelet approach (an example of usage for the local costmap can be found here).

cheers
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

Nick Hoo
Thank you very much
Reply | Threaded
Open this post in threaded view
|

Re: Demo RTAB-Map on Turtlebot

Nick Hoo
In reply to this post by matlabbe
I saw that university of Freiburg useing octomap in the humanoid robot path planning, I feel the navigation is very good. So I want to learn about Rtabmap and humanoid robot both base on octomap, in addition to the driver is different, what is the difference between the other.
https://www.youtube.com/watch?v=srcx7lPoIfw
1234