Manual Driving#
Drive the differential-drive base manually with keyboard teleop, publishing
velocity commands through the collision-aware /cmd_vel_safe topic. This is
the simplest navigation scenario and a good way to confirm the base, odometry
(EKF), and robot state publisher (RSP) are wired up before mapping or
autonomous navigation. 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
Run the EKF + robot state publisher:
nros ros2 launch movensys_navigation_nav2_config base.launch.py use_sim_time:=true
Add
rsp:=falseif using Gazebo orros2_control– both already publish/robot_description.Drive with the teleop keyboard:
nros ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args \ -p turn:=0.5 \ -p stamped:=true \ -p frame_id:=base_link \ -p use_sim_time:=true \ -r cmd_vel:=/cmd_vel_safe
Keep this terminal focused to send keystrokes to the base.
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_differential.md).Run the EKF + robot state publisher:
nros ros2 launch movensys_navigation_nav2_config base.launch.py use_sim_time:=true
Add
rsp:=falseif using Gazebo orros2_control– both already publish/robot_description.Drive with the teleop keyboard:
nros ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args \ -p turn:=0.5 \ -p stamped:=true \ -p frame_id:=base_link \ -p use_sim_time:=true \ -r cmd_vel:=/cmd_vel_safe
Danger
This drives the physical base.
Complete Try Your Robot first, keep the area clear, and keep a hand on the emergency stop. Start at the lowest speed the teleop allows.
Start WMX R2 for the differential base (see
~/workspaces/movensys_ws/src/wmx-r2/doc/launch_differential.md). Nouse_sim_timeon real hardware.Run the EKF + robot state publisher:
nros ros2 launch movensys_navigation_nav2_config base.launch.py
Add
rsp:=falseif usingros2_control, which already publishes/robot_description. Adduse_cuvslam:=trueto use cuVSLAM.Drive with the teleop keyboard:
nros ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args \ -p turn:=0.5 \ -p stamped:=true \ -p frame_id:=base_link \ -r cmd_vel:=/cmd_vel_safe
Keep this terminal focused to send keystrokes to the base. Releasing the keys stops the base:
differential_drive_controllerforces the wheel target to zero aftercmd_vel_timeout(0.25 s) without a command.