|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 PackageDescription: 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.
This package include the following node(s).
The webots_launcher is used to start Webots from your launch file, it has the following arguments:
--world: defines the path to the simulation world to load.
--mode: defines the simulation mode with which Webots should be started (realtime is set by default).
--no-gui: if set, Webots starts with minimal graphical user interface, this is useful to use on a server for example.
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.
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.
This module provides the following utility functions:
get_webots_home: computes and returns the path to the Webots installation directory. None is returned if Webots is not found.
get_webots_version: computes and returns the version of Webots as a string.
append_webots_lib_to_path: adds the Webots lib folder to the library path.
append_webots_python_lib_to_path: adds the Webots Python API to the Python path.
This module provides the JointStatePublisher class that is used to publish joint states.
This module provides the TrajectoryFollower class that is used to provide an action server to move the joints.