ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.48k stars 1.26k forks source link

Navigation failing #1891

Closed Tahir-Rasheed-437 closed 4 years ago

Tahir-Rasheed-437 commented 4 years ago

rosbag2_2020_07_30-16_52_46.zip catkin_vrep_ROS2_interface.zip

Required Info:

My Scénario:

I am currently using master branch in simulation with vrep. I am launching the navigation using: ros2 launch nav2_bringup bringup_launch.py use_sim_time:=True autostart:=True \map:=src/navigation2/nav2_bringup/bringup/maps/map1.yaml

map1 is loaded. Then, i am launching nav2_default_view file of rviz, giving the initial pose, robot footprint and the cost maps are loaded and then i can be able to give the navigaiton2 Goal. it works perfectly fine until after some time navigation crashed with an error:

[ERROR] [planner_server-6]: process has died [pid 73156, exit code -11, cmd '/home/irt-tests/catkin_navigation2_wsb/install/nav2_planner/lib/nav2_planner/planner_server --ros-args -r __node:=planner_server --params-file /tmp/tmpsiwxomfg -r /tf:=tf -r /tf_static:=tf_static'].

Scenario

I have CoppeliaSim simulator generating all the necessary topics of /odom, /clock and /scan (bag file is attached). The tf tree should look something like this map->odom->base_footprint->base_link->laser_0. I have a transform publisher node which listens to /odom topic and generate a tf odom->base_link and two static_transform_publisher generating a static tf i.e. base_footprint->base_link and base_link->laser0.

Steps to reproduce issue

navigation-crash

Expected Behavior:

[bt_navigator-8] [INFO] [1595945836.681411650] [bt_navigator]: Begin navigating from current location to (-0.23, 2.67)
[controller_server-5] [INFO] [1595945836.710117744] [controller_server]: Received a goal, begin computing control effort.
[controller_server-5] [INFO] [1595945836.711112405] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1595945837.761183733] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1595945838.811177602] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1595945839.811178401] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1595945746.313199054] [DWBLocalPlanner]: Goal reached!
[controller_server-5] [INFO] [1595945746.314244070] [controller_server]: Reached the goal!
[bt_navigator-8] [INFO] [1595945746.351255205] [bt_navigator]: Navigation succeeded

Actual Behavior:

[bt_navigator-8] [INFO] [1596007816.175238628] [bt_navigator]: Begin navigating from current location to (-2.33, -6.90)
[controller_server-5] [INFO] [1596007816.199533047] [controller_server]: Received a goal, begin computing control effort.
[controller_server-5] [INFO] [1596007817.249875047] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1596007818.299867183] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1596007819.299870500] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1596007820.349867272] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1596007821.350068435] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1596007822.399868204] [controller_server]: Passing new path to controller.
[ERROR] [controller_server-5]: process has died [pid 73154, exit code -11, cmd '/home/irt-tests/catkin_navigation2_wsb/install/nav2_controller/lib/nav2_controller/controller_server --ros-args --params-file /tmp/tmpo02t483r -r /tf:=tf -r /tf_static:=tf_static'].
[ERROR] [planner_server-6]: process has died [pid 73156, exit code -11, cmd '/home/irt-tests/catkin_navigation2_wsb/install/nav2_planner/lib/nav2_planner/planner_server --ros-args -r __node:=planner_server --params-file /tmp/tmpsiwxomfg -r /tf:=tf -r /tf_static:=tf_static'].

or just after giving the 2D position estimate:

planner_server-5] [INFO] [1596120076.863919890] [global_costmap.global_costmap]: start
[planner_server-5] [INFO] [1596120076.916848903] [planner_server]: Activating plugin GridBased of type NavfnPlanner
[lifecycle_manager-9] [INFO] [1596120076.917515320] [lifecycle_manager_navigation]: Activating recoveries_server
[recoveries_server-6] [INFO] [1596120076.917769890] [recoveries_server]: Activating
[recoveries_server-6] [INFO] [1596120076.917799398] [recoveries_server]: Activating spin
[recoveries_server-6] [INFO] [1596120076.917810396] [recoveries_server]: Activating backup
[recoveries_server-6] [INFO] [1596120076.917817175] [recoveries_server]: Activating wait
[lifecycle_manager-9] [INFO] [1596120076.918087314] [lifecycle_manager_navigation]: Activating bt_navigator
[bt_navigator-7] [INFO] [1596120076.918263796] [bt_navigator]: Activating
[lifecycle_manager-9] [INFO] [1596120076.918545663] [lifecycle_manager_navigation]: Activating waypoint_follower
[waypoint_follower-8] [INFO] [1596120076.918722359] [waypoint_follower]: Activating
[lifecycle_manager-9] [INFO] [1596120076.919013945] [lifecycle_manager_navigation]: Managed nodes are active
[ERROR] [controller_server-4]: process has died [pid 180439, exit code -11, cmd '/home/irt-tests/catkin_navigation2_ws/install/nav2_controller/lib/nav2_controller/controller_server --ros-args --params-file /tmp/tmps1avp5jw -r /tf:=tf -r /tf_static:=tf_static'].

And after this error, navigation won't work anymore. The error can be either from planner_server, or controller_server or bt_navigator. Sometimes the error is generated at the very start of the navigation, and sometimes later during the navigation. The same error is generated if i used tb3_simulation_launch.py for my own simulation.

SteveMacenski commented 4 years ago

Properly fill in the Issue template, please.

Tahir-Rasheed-437 commented 4 years ago

@SteveMacenski , apologies, i have filled the necessary information.

SteveMacenski commented 4 years ago

@Tahir-Rasheed-437 please try again. You're still missing sections.

Tahir-Rasheed-437 commented 4 years ago

@SteveMacenski apologies for the delay, i have tried my best to upload as much information as possible. Still if something is missing please do let me know. i have tried alot to remove the crash but its keep on coming sooner or later. Kindly do try and please let me know if you can find anything. Thank you.

SteveMacenski commented 4 years ago

I have CoppeliaSim simulator generating all the necessary topics of /odom, /clock and /scan (bag file is attached).

Try gazebo and see if you can reproduce, we're not going to debug specific third-party simulator issues if they don't properly deal with ROS correctly.

Try compiling with GDB and get a traceback, that should help us narrow down the reason for a crash

Tahir-Rasheed-437 commented 4 years ago

I did tried gazebo and no problems there. Maybe something is wrong on CoppeliaSim side not sure about it. I tried to mix gazebo and CoppeliaSim and somehow it also did work out. Things start getting crash as soon as the transforms are not from gazebo but my own nodes (the error somehow also shows that its not happy with my tf's)

Just a quick query, are the tf's in foxy-navigation are used/published the same way as dashing-navigation? I am using the same package that generates the tf which i wrote for dashing and i hope no changes there. (sorry for this query, if its not directly related to navigation but just wondering about it)

Sure i'll try what you said. What is GDB stand for? sorry i am not very familiar with the notations. Thank you again for your tips.

SteveMacenski commented 4 years ago

No changes from dashing to foxy on navigation2's use of TF2, but you'd have to look at TF2 itself to know if it changed. My guess is your sim isnt publishing the right info or isn't providing all the necessary information. But again, you'd need to get a traceback to know.

https://www.gnu.org/software/gdb/

SteveMacenski commented 4 years ago

We're welcome to keep debugging, but since we solved this as a non-nav2 problem, I'm closing the ticket. Feel free to keep commenting or start a thread in slack