0
$\begingroup$

I have a question:

What I want to achieve

In rviz2 (foxy) is the waypoint mode in the nav2 panel but I want to interact programmatically with the waypoint mode.

My Problem

I using foxy as distro. Unfortuneately, simple_commander don't exist for foxy.

My Approach

Therefore, I copy paste the simple commander folder (from humble) inside of my nav2 package of my workspace (I build nav2 stack from source). Colcon build gave me some errors and warning. I fixed them all step by step. I added some actions and msg in the nav2_msg package. For example, if you open robot_navigator.py, you'll see in import AssistedTeleop in line 26 it's whited out. After I added the necessary files, it's not whited out anymore and the error/warning disappear.

Now colcon build works without an error or warnings. I can also set the initial pose and send a single goal programmatically. However, the simple commander waypoint mode don't work. Its always showing:

[INFO] [1694809146.773522212] [basic_navigator]: Nav2 is ready for use!
[INFO] [1694809147.776931425] [basic_navigator]: 'FollowWaypoints' action server not available, waiting...
[INFO] [1694809148.779486553] [basic_navigator]: 'FollowWaypoints' action server not available, waiting...
[INFO] [1694809149.782442363] [basic_navigator]: 'FollowWaypoints' action server not available, waiting...
[INFO] [1694809150.785148441] [basic_navigator]: 'FollowWaypoints' action server not available, waiting...
[INFO] [1694809151.787991259] [basic_navigator]: 'FollowWaypoints' action server not available, waiting...

Moreover, the action /FollowWaypoint is available (ROS2 action list):

robot@robot:~$ ros2 action list
/FollowWaypoints
/assisted_teleop
/backup
/compute_path_through_poses
/compute_path_to_pose
/follow_path
/follow_waypoints
/navigate_through_poses
/navigate_to_pose
/smooth_path
/spin
/wait

My Question

I forgot something?

$\endgroup$

1 Answer 1

1
$\begingroup$

🎵 Which one of these is not like the others, which one of these just doesn’t belong 🎵

You can see the WPF action is CamelCase while the rest are snake_case. We fixed that ages ago in the modern Nav2 distributions, but the WPF in the simple navigator is expecting it to be the corrected version.

It should be a one-line change in the python class to adjust the action interface string to the “broken” CamelCase version.

$\endgroup$
1
  • 1
    $\begingroup$ Thank you Steve ! I really appreciate your help ;) $\endgroup$
    – ChangeNAL
    Sep 16, 2023 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.