Skip to content

RobotnikAutomation/robotnik_webots

Repository files navigation

robotnik_webots

This package provides integration and launch files for simulating Robotnik robots in the Webots simulator.

Structure

  • launch/: ROS 2 launch files for spawning robots and worlds in Webots.
  • protos/: Custom Webots PROTO files for robot models.
  • resource/: Robot resources, including URDF, configuration files, and meshes.
  • robotnik_webots/: Python package directory (can be used for ROS 2 nodes or utilities).
  • worlds/: Webots world files.

Usage

To build this package with ROS 2 and colcon:

colcon build --packages-select robotnik_webots

Launch files and arguments

1. Launch the Webots world

ros2 launch robotnik_webots spawn_world.launch.py

or with the new launch file:

ros2 launch robotnik_webots new_spawn_world.launch.py

Arguments for spawn_world.launch.py and new_spawn_world.launch.py

  • world: Name of the world file (without extension). Default: default_world
  • world_path: Full path to the world file. Default: <package_share>/worlds/<world>.wbt
  • gui: Launch Webots with GUI (true/false). Default: true

Examples:

Launch a specific world:

ros2 launch robotnik_webots new_spawn_world.launch.py world:=my_custom_world

Launch headless (no GUI):

ros2 launch robotnik_webots new_spawn_world.launch.py gui:=false

2. Spawn a robot in Webots

ros2 launch robotnik_webots spawn_robot.launch.py

Arguments for spawn_robot.launch.py

  • robot_id: Robot personal name. Default: robot
  • robot: Robot model (e.g., rbwatcher, rbvogui, rbkairos, rbtheron, rbsummit). Default: rbwatcher
  • robot_model: Robot type variation. Default: value of robot
  • x, y, z: Initial position in the world. Default: 0.0
  • run_rviz: Launch RViz2 (true/false). Default: false

Examples:

Spawn a robot at a specific position:

ros2 launch robotnik_webots spawn_robot.launch.py x:=2.0 y:=1.0 z:=0.0

Spawn a robot with a custom name and model:

ros2 launch robotnik_webots spawn_robot.launch.py robot_id:=robot_a robot:=rbkairos

Spawn a robot and launch RViz2:

ros2 launch robotnik_webots spawn_robot.launch.py run_rviz:=true

Requirements

  • ROS 2 (Humble or later)
  • Webots simulator

License

See the LICENSE file for details.

About

ROS2 package to run webots simulation with Robotnik robots

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published