gazebo models for ros2
ros2 launch tuw_gazebo world.launch.py room:=cave
ros2 launch tuw_gazebo_models spawn_robot.launch.py model_name:=robot0 \
robot:=pioneer3dx \
X:=-6.0 Y:=-6.0 Theta:=0.7
- model_name model name used in gazebo and node prefix
- robot robot type used to load the correct xacro file from your model folder
No additional namespace is set
ros2 launch tuw_gazebo_models rviz.launch.py config:=robot0
ros2 run tuw_gazebo_wanderer wanderer_v0.py --ros-args --remap cmd:=/r0/cmd_vel --remap scan:=/r0/scan_raw
Useful ROS2 service calls to gazebo
# delete a Entry/Model
ros2 service call /delete_entity 'gazebo_msgs/DeleteEntity' '{name: "robot0"}'
# list Models
ros2 service call /get_model_list 'gazebo_msgs/srv/GetModelList'
# reset simulation
ros2 service call /reset_simulation 'std_srvs/srv/Empty'
I suggest to use the mouse_teleop from teleop_tools. The dashing-devel branch works also for galactic!
ros2 run mouse_teleop mouse_teleop --ros-args --remap mouse_vel:=cmd_vel
We are going to use the namespace argument set on r0
ros2 launch tuw_gazebo_models spawn_robot.launch.py namespace:=r0 \
model_name:=robot0 \
robot:=pioneer3dx \
X:=-6.0 Y:=-6.0 Theta:=0.7
without namespace
ros2 launch tuw_gazebo_models rviz.launch.py config:=robot0
with namespace
ros2 launch tuw_gazebo_models rviz.launch.py config:=robot0 namespace:=r0
IDE configuartion are avliable in ide
sudo apt install ros-$ROS_DISTRO-rmw-cyclonedds-cpp python3-pip ros-$ROS_DISTRO-tf-transformations python3-transforms3d
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y