need some help in getting path planning to work with rtabmap

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

need some help in getting path planning to work with rtabmap

TOM_RB
This post was updated on .
Hello,

- My plan is - as I have discussed in previous posts in this forum - is to do path planning and navigation of a real robot.
- My two wheeled robot uses 3 D435i cameras and one T265 camera for odometry
- Being new to ros , I have barely tuned most parameters in the navigation params files , relying instead on default settings from online tutorials etc.

* Recap of my steps:
1) I mapped my office, created a database, and launched Rtabmapviz in localization mode. The localization seems to be working.
    My launch file is included here for reference :
    my_robot_slam.launch
2) I saved the map created in the form :  .yaml
3) I created a launch file for navigation :
     my launch file link : my_robot_navigation.launch
     As the launch file indicates, I'm launching move_base customized with the following parameters:
     costmap_common_params.yaml
     local_costmap_params.yaml
     global_costmap_params.yaml
     base_local_planner_params.yaml
 
4) Now that move base is running, and Rtabmapviz is running in localization, I find that when using "2D nav goal" tool in rviz , there is no path file created from the current position to the new goal even though i am visualizing the following topics in rviz :
 /planner/move_base/TrajectoryPlannerROS/global_plan
 /planner/move_base/TrajectoryPlannerROS/local_plan

Can anyone help in resolving this issue? What am I doing wrong and why is move_base still unable to resolve a path plan? This was supposed to be straight forward but I am still struggling with getting move_base to work with rtabmap for two weeks now.



my rqt graph : rosgraph.svg


TOM SMITH
Reply | Threaded
Open this post in threaded view
|

Re: need some help in getting path planning to work with rtabmap

matlabbe
Administrator
A couple of things :)
* You don't need map_server if you are using rtabmap in localization mode.
* You should remove those static transforms:
<node pkg="tf" type="static_transform_publisher" name="base_link_map" args="0 0 0 0 0 0 /base_link /map 100"/>
<node pkg="tf" type="static_transform_publisher" name="base_link_odom" args="0 0 0 0 0 3.14 /base_link /odom 100"/>

I am more interested to your tf tree:
rosrun tf view_frames

You should have something like this I think:
map->cam_t265_odom_frame -> cam_t265_pose_frame -> cam_t265_link

Make sure you are publishing your goal from rviz on the right topic, it seems the standard topic name has been renamed on /planner_goal:
<remap from="move_base_simple/goal" to="/planner_goal"/>

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

Re: need some help in getting path planning to work with rtabmap

TOM_RB
Hello and thank you for your notes

One more question. What topic should I use if I want to use the RTABmap generated map instead of publishing the saved map using map_server.

The confusion I am facing is caused because of the strategy I am trying to follow. I was trying to use the same autonomous navigation method used by turtlebot3. This is why I am converting the RTABmap generated database into a 2D (.yaml) map using map_saver. Am I defeating the purpose of RTABmap by doing this (converting 3D map and 3D point cloud into a 2D map and laserscans) ? Is there any other way to accomplish autonomous navigation of the robot? maybe directly using the 3D map and the depth cameras point cloud?
TOM SMITH
Reply | Threaded
Open this post in threaded view
|

Re: need some help in getting path planning to work with rtabmap

matlabbe
Administrator
rtabmap provides the 2D grid map directly: /rtabmap/grid_map topic

Right now you are saving /rtabmap/grid_map to .yaml with map_saver, then reload that .yaml with map_server and republish /map. /map and /rtabmap/grid_map are exactly the same thing.
Reply | Threaded
Open this post in threaded view
|

Re: need some help in getting path planning to work with rtabmap

matlabbe
Administrator
Reply | Threaded
Open this post in threaded view
|

Re: need some help in getting path planning to work with rtabmap

TOM_RB
Thanks again

I edited the tf tree so that it looks like what you suggested. The resulting tf tree is as follows:
frames.pdf
This was produced by the following launch file:
my_robot_slam.launch
I tried mapping and localization and everything seems to work nicely. I will now proceed with autonomous navigation. If there are any notes on the tf tree kindly note.

Best regards
TOM SMITH