Turtlebot4 Navigation Issues (2D Pose Estimate does nothing, Issues in SLAM console) #492
-
Edit 11/13/24: This question was made in user error trying to run SLAM and Navigation2 at once. SLAM is meant to map out the area, and localization nodes are necessary for nav2 to be active. I have been attempting to follow the navigation tutorials provided on the Turtlebot4 User Manual. However, RViz doesn't seem to work as shown: namely, the 2D Pose Estimate never resolves or produces any result. The console that produced RViz logs the starting position and orientation, but that's it. In addition, there are a number of other INFO, ERRORS and Warnings I recieve on the SLAM console which may be of interest, such as:
Any suggestions for dealing with any of these issues? Of primary interest is getting 2D Pose estimate to work, but I have listed my other issues in case they share a cause or help in diagnosing the problem. Edit (11/12/2024): After messing around and looking at the topics and how they change w.r.t to Rviz, I believe I have found at least one issue. Rviz doesn't seem to correctly publish to the /initial_pose topic. No matter how many times I apply the 2D Pose Estimate tool, the /initial_pose topic remains unpublished. I am not sure how to fix this, so advice is still appreciated. The topic name for 2D estimate is initialpose, not initial_pose. I assume that there is a similar issue with nav2, but I can't edit it from RViz and I'm not sure how to edit it in the code. in /opt/ros/humble/share/slam_toolbox/config under Tools: under Class: rviz_default_plugins/SetInitialPose under Topic under Value, the value is /initialpose instead of /initial_pose, which is the topic the robot produces. I assume there is something similar in Nav2 but I have not found it yet. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
@antebellumcerebellum It is not clear to me what exactly you are trying to do. You mention using slam but you also mention trying to set an initial pose. I will address these two items separately and perhaps that can either clear up some confusion or allow you to clarify to me what you are doing. SLAM - timestamp error: When operating any ROS system it is important to make sure all computers in the system are time synced together. Generally in the context of the turtlebot4 all devices sync to the ubuntu ntp servers and therefore this is taken care of. This error can also show up with excessively bogged down networks / systems if the messages take too long to arrive. By looking more carefully at the exact time stamps you can get clues to what is causing this. You mention that you checked CPU and RAM but I would suggest that you look more closely at your network. At minimum make sure that you are using a 5 GHz WiFi network, latest software and if on humble try using discovery server to reduce traffic. SLAM - queue size warning: By default in Humble the slam minimum travel distance is set to 0 which means that even if you stop moving it will continue to attempt to map. This is only a problem when mapping particularly large environments or if you take a very long time to map an environment. If you are running into this issue while mapping then I would suggest making a copy of the SLAM config in the turtlebot4 repo and modifying the minimum travel distance / angle to a non-zero value. Launching slam with this custom config will allow you to pause mapping by stopping the robot and allow the system to catch up. For most use cases, SLAM should only be active when you do initial mapping of the environment and then you save your map and move on to using nav2 + localization nodes. SLAM and localization should not be active at the same time. Using SLAM does not involve manually setting an initial pose. Localization - Set initial pose: When you are using localization you always have to set your initial pose. You mention that Rviz is publishing to To summarize the 3 different launch options:
Let me know if this does not answer your question and provide a step by step of what you are doing / trying to do. |
Beta Was this translation helpful? Give feedback.
@antebellumcerebellum It is not clear to me what exactly you are trying to do. You mention using slam but you also mention trying to set an initial pose. I will address these two items separately and perhaps that can either clear up some confusion or allow you to clarify to me what you are doing.
SLAM - timestamp error: When operating any ROS system it is important to make sure all computers in the system are time synced together. Generally in the context of the turtlebot4 all devices sync to the ubuntu ntp servers and therefore this is taken care of. This error can also show up with excessively bogged down networks / systems if the messages take too long to arrive. By looking more carefu…