RTAB-Map viz Crash error with waypoints

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

RTAB-Map viz Crash error with waypoints

GGYU
This post was updated on .
gdb_bt.txt This file is gdb back trace file.


Hello Mathieu,

My name is GGYU and I’m implementing waypoint-based autonomous navigation using RTAB-Map-0.21.9 in a ROS 2 Humble environment. I create labels with rtabmap_viz’s Current Location Label feature and then use the Send Waypoints function to turn those labels into waypoints.

However, during operation the rtabmap_viz process unexpectedly terminates. The rtabmap node itself stays running, so the robot stops only after reaching the last waypoint that rtabmap_viz sent.

I would appreciate any advice on the possible cause of this issue and how to resolve it.

Additionally, I have a few questions about RTAB-Map:

Label Creation Constraint
Why can labels only be created on the mapped trajectory, and why does a click outside the trajectory snap to the nearest trajectory point?

Path-Following Behavior
When I execute Send Waypoints, why does the robot follow the existing trajectory instead of driving straight toward the label?

Waypoint Count Limit
I’ve tried sending up to about 20 waypoints—does rtabmap_viz impose a maximum? If so, what is the limit and why?

I know you’re busy, but any guidance you can provide would be greatly appreciated.

Thank you.

Sincerely,
GGYU
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-Map viz Crash error with waypoints

matlabbe
Administrator
Hi GGYU,

For this error:
#0  0x00005555555a609f in std::_Function_handler<void (std::shared_future<std::shared_ptr<rtabmap_msgs::srv::SetGoal_Response_<std::allocator<void> > > >), rtabmap_viz::GuiWrapper::handleEvent(UEvent*)::{lambda(std::shared_future<std::shared_ptr<rtabmap_msgs::srv::SetGoal_Response_<std::allocator<void> > > >)#1}>::_M_invoke(std::_Any_data const&, std::shared_future<std::shared_ptr<rtabmap_msgs::srv::SetGoal_Response_<std::allocator<void> > > >&&) ()
#1  0x000055555562b4d3 in rclcpp::Client<rtabmap_msgs::srv::SetGoal>::handle_response(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<void>) ()
#2  0x00007ffff38f2736 in  () at /opt/ros/humble/lib/librclcpp.so
#3  0x00007ffff38f01da in rclcpp::Executor::execute_client(std::shared_ptr<rclcpp::ClientBase>) () at /opt/ros/humble/lib/librclcpp.so
#4  0x00007ffff38f03cd in rclcpp::Executor::execute_any_executable(rclcpp::AnyExecutable&) () at /opt/ros/humble/lib/librclcpp.so
#5  0x00007ffff38f7d20 in rclcpp::executors::SingleThreadedExecutor::spin() ()
    at /opt/ros/humble/lib/librclcpp.so
#6  0x00007ffff26dc253 in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x00007ffff2294ac3 in start_thread (arg=<optimized out>)
    at ./nptl/pthread_create.c:442
#8  0x00007ffff2326850 in clone3 ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Warning: 'set logging off', an alias for the command 'set logging enabled', is deprecated.
Use 'set logging enabled off'.
I could not reproduce it with turtlebot4_sim_demo.launch.py. Do you launch rtabmap_viz inside a ComposableNodeContainer? That may not be possible because Qt should run in the main thread. Launch it as standalone node instead.

Label Creation Constraint 
Labels are associated with nodes, so their pose match the node associated with. In the database, the label is just another field associated to a Node like its ID. We currently don't have a way to arbitrary link an entity outside the graph to the graph, like landmarks do. We limit the goal to be not farther than "RGBD/LocalRadius" from the closest node on the graph. We could add an option to ignore that thought. Actually here, you could set "rtabmap_.computePath(pose, 99999)" to mostly accept all far goals from the graph.

Path-Following Behavior
It will follow the path up to RGBD/LocalRadius. If RGBD/LocalRadius=0, it would likely go directly to the last goal. The reason why we force the robot to follow the map's path is to increase the likelihood of re-localization / loop closures, which is important when we follow a path. This is explained in this paper (Section 3.5.1).

Waypoint Count Limit
There should be no limit to waypoints (well, unless QInputDialog's LineEdit input type has a limit of characters). Note that it can be done with an external python node. For example, by converting this patrol.py script from ros1 to ros2, it could be possible to handle as many waypoints you want (see at 2:35 in this video for an example of usage on ros1).

cheers,
Mathieu