Note: This tutorial assumes that you have completed the previous tutorials: webots_ros2_msgs.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

webots_ros2_core Package

Description: Core interface package.

Keywords: Webots, Simulator, ROS

Tutorial Level: INTERMEDIATE

Next Tutorial: webots_ros2_msgs

This package is the core package which allows to easily start Webots and create node to interface simulated robot in Webots with ROS.

Node(s)

This package include the following node(s).

webots_launcher

The webots_launcher is used to start Webots from your launch file, it has the following arguments:

  1. --world: defines the path to the simulation world to load.

  2. --mode: defines the simulation mode with which Webots should be started (realtime is set by default).

  3. --no-gui: if set, Webots starts with minimal graphical user interface, this is useful to use on a server for example.

Python Modules

This package includes the following Python modules that can be used from within other nodes to easily create an interface between a simulated robot and ROS.

webots_node

This module provides the WebotsNode class that is used as a base class for all the other nodes. It creates the interface between Webots and ROS and publishes the clock topic.

utils

This module provides the following utility functions:

  1. get_webots_home: computes and returns the path to the Webots installation directory. None is returned if Webots is not found.

  2. get_webots_version: computes and returns the version of Webots as a string.

  3. append_webots_lib_to_path: adds the Webots lib folder to the library path.

  4. append_webots_python_lib_to_path: adds the Webots Python API to the Python path.

joint_state_publisher

This module provides the JointStatePublisher class that is used to publish joint states.

trajectory_follower

This module provides the TrajectoryFollower class that is used to provide an action server to move the joints.

Wiki: webots_ros2/Tutorials/webots_ros2_core (last edited 2019-09-05 07:21:49 by OlivierMichel)