Autonomous Navigation#
Drive the base autonomously with the Nav2 stack:
localize against the map saved in SLAM Mapping, set the initial pose, and
send goal poses that Nav2 plans and executes on the collision-aware
/cmd_vel_safe topic. See Example Applications for the shared navigation setup. All
commands run through nros.
Open the scene:
Open
~/workspaces/movensys-simulation/<NAVIGATION_MODEL>/navigation_simulation.usdnros ros2 launch movensys_navigation_description gazebo_navigation_simulation.launch.py
Run the simulator bridge:
nros ros2 launch movensys_navigation_nav2_config sim_bridge.launch.py use_sim_time:=true
Launch navigation:
nros ros2 launch movensys_navigation_nav2_config navigation.launch.py use_sim_time:=true
Add
rsp:=falseif using Gazebo orros2_control– both already publish/robot_description.Set the initial pose: in RViz, click 2D Pose Estimate and click the map at the robot’s current position and heading.
Send a goal pose:
nros ros2 action send_goal /navigate_to_pose nav2_msgs/action/NavigateToPose \ "'{pose: {header: {frame_id: map}, pose: {position: {x: 8.0, y: 0.0, z: 0.0}, \ orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}}}'"
Open the scene:
Open
~/workspaces/movensys-simulation/<NAVIGATION_MODEL>/navigation_hil.usdNot applicable for HIL.
Start WMX R2 for the navigation base (real WMX runtime) with
use_sim_time:=true(see~/workspaces/movensys_ws/src/wmx-r2/doc/launch_<NAVIGATION_MODEL>_navigation.md).Launch navigation:
nros ros2 launch movensys_navigation_nav2_config navigation.launch.py use_sim_time:=true
Add
rsp:=falseif using Gazebo orros2_control– both already publish/robot_description.Set the initial pose: in RViz, click 2D Pose Estimate and click the map at the robot’s current position and heading.
Send a goal pose:
nros ros2 action send_goal /navigate_to_pose nav2_msgs/action/NavigateToPose \ "'{pose: {header: {frame_id: map}, pose: {position: {x: 8.0, y: 0.0, z: 0.0}, \ orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}}}'"