ros2 launch clearpath_gz simulation.launch.py
NOTE: we must click "start" within 3-4 seconds/
Commands to test
ros2 topic pub /a200_0000/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}"
We can use teleop_twist_keyboard to control the robot with keyboard. Only thing to be carefly is to map topics to the one set by clearpath.
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --remap cmd_vel:=a200_0000/cmd_vel
We can use different clearpath robots by modifying robot.yaml file in ~/clearpath
. An example is given as bellow:
ros2:
namespace: a200_0000
domain_id: 0
middleware:
implementation: rmw_fastrtps_cpp
workspaces:
- /home/mscroboticslaptop19/clearpath_ws/install/setup.bash
Then, we need to regenerate robot simulation files.
ros2 run clearpath_generator_common generate_bash -s ~/clearpath
source ~/clearpath/setup.bash
sudo apt install ros-humble-slam-toolbox
- run simulation
ros2 launch clearpath_gz simulation.launch.py
- view in rviz
ros2 launch clearpath_viz view_navigation.launch.py namespace:=a200_0000
- run SLAM_toobox
ros2 launch clearpath_nav2_demos slam.launch.py setup_path:=$HOME/clearpath/ use_sim_time:=true
- use keyboard control to move robot everwhere to build a map
```shell
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --remap cmd_vel:=a200_0000/cmd_vel
rqt_grap about slam is