Skip to content

tuw-robotics/tuw_gazebo

Repository files navigation

tuw_gazebo

gazebo models for ros2

pioneer robot in cave pioneer robot with laser ranger pioneer robot in roblab

Demo

Launch World

ros2 launch tuw_gazebo world.launch.py room:=cave

Spawn a robot

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

RViz2

No additional namespace is set

ros2 launch tuw_gazebo_models rviz.launch.py config:=robot0

Rviz2 with pioneer robot in cave

Wanderer

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'

Teleop

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

Multuiple robots and namespaces

Spawn a robot

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

RViz2

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

Rviz2 with pioneer robot in cave Rviz2 with pioneer robot in cave

IDE

IDE configuartion are avliable in ide

Install missing dependencies

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

About

GazeboSim Models such as a pioneer differential drive

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published