I am launching a vanila nav2 stack with ros-ion/gazebo-fortress. Everything starts up properly and I can run waypoint following via Rviz. However, when I try to run waypoint following using the commander API it complains that the amcl/get_state service is unavailable.
The commander API should initialize and robot should follow waypoints.
Actual behavior
The nav.waitForNav2Active() call hangs.
[namoros-8] [INFO] [1711542259.476309392] [namoros.namoros_main]: amcl/get_state service not available, waiting...
[namoros-8] [INFO] [1711542260.580838297] [namoros.namoros_main]: amcl/get_state service not available, waiting...
[namoros-8] [INFO] [1711542261.599272221] [namoros.namoros_main]: amcl/get_state service not available, waiting...
[namoros-8] [INFO] [1711542262.654907867] [namoros.namoros_main]: amcl/get_state service not available, waiting...
[namoros-8] [INFO] [1711542263.684143388] [namoros.namoros_main]: amcl/get_state service not available, waiting...
Additional information
The AMCL node is active:
$ ros2 lifecycle get /amcl
active [3]
I can call the /amcl/get_state service manually, but it takes a few seconds to respond:
$ ros2 service call /amcl/get_state lifecycle_msgs/srv/GetState
requester: making request: lifecycle_msgs.srv.GetState_Request()
response:
lifecycle_msgs.srv.GetState_Response(current_state=lifecycle_msgs.msg.State(id=3, label='active'))
If I comment out the call to nav.waitForNav2Active(), then it hangs at
[namoros-8] [INFO] [1711544599.059104336] [namoros.namoros_main]: 'FollowWaypoints' action server not available, waiting...
I gets even weirder. I can send waypoints using the ros2 cli. So this definitely seems to be an issue with the commander API itself.
@SteveMacenski I posted here with additional context because I think there is a bug related to namespacing. Please read my comments in the "Additional Information" section above.
I think this line from the docs might have something to do with it.
Bug report
Required Info:
Steps to reproduce issue
I am launching a vanila nav2 stack with ros-ion/gazebo-fortress. Everything starts up properly and I can run waypoint following via Rviz. However, when I try to run waypoint following using the commander API it complains that the
amcl/get_state
service is unavailable.Here is what I am doing with the commander API.
Here are my nav2 params:
And here is my launch.py
Expected behavior
The commander API should initialize and robot should follow waypoints.
Actual behavior
The
nav.waitForNav2Active()
call hangs.Additional information
The AMCL node is active:
I can call the
/amcl/get_state
service manually, but it takes a few seconds to respond:If I comment out the call to
nav.waitForNav2Active()
, then it hangs atI gets even weirder. I can send waypoints using the ros2 cli. So this definitely seems to be an issue with the commander API itself.