carla/Docs/ros_launchs.md

30 KiB

Launchfiles reference


carla_ackermann_control.launch

Creates a node to manage a vehicle using Ackermann controls instead of the CARLA control messages. The node reads the vehicle info from CARLA and uses it to define the controller. A simple Python PID is used to adjust acceleration/velocity. This is a Python dependency that can be easily installed with pip.

pip install --user simple-pid

It is possible to modify the parameters in runtime via ROS dynamic reconfigure. Initial parameters can be set using a settings.yaml. The path to it depends on the bridge installation.

  • Deb repository installation,
    /opt/carla-ros-bridge/melodic/share/carla_ackermann_control/config/settings.yaml.
  • Source repository installation,
    /catkin_ws/src/ros-bridge/carla_ackermann_control/config/settings.yaml.

/carla_ackermann_control_ego_vehicle (Node)

Converts [AckermannDrive messages](http://docs.ros.org/jade/api/ackermann_msgs/html/msg/AckermannDrive.htm) to [CarlaEgoVehicleControl.msg](../ros_msgs#carlaegovehiclemsg). Speed is in __m/s__, steering angle in __radians__ and refers to driving angle, not wheel angle.

Subscribed to:

Publishes in:


carla_ego_vehicle.launch

Spawns an ego vehicle (role-name="ego_vehicle"). The argument sensor_definition_file describes the sensors attached to the vehicle. It is the location of a .json file. The format of this file is explained here.

To spawn the vehicle at a specific location, publish in /carla/ego_vehicle/initialpose, or use RVIZ and select a position with 2D Pose estimate.

carla_ego_vehicle_ego_vehicle (Node)

Spawns an ego vehicle with sensors attached, and waits for world information.

Subscribed to:


carla_example_ego_vehicle.launch

Based on carla_ego_vehicle.launch, spawns an ego vehicle (role-name="ego_vehicle"). The file sensors.json describes the sensors attached. The path to it depends on the bridge installation.

  • Deb repository installation,
    /opt/carla-ros-bridge/melodic/share/carla_ego_vehicle/config/sensors.json.
  • Source repository installation,
    /catkin_ws/src/ros-bridge/carla_ego_vehicle/config/sensors.json.

carla_ego_vehicle_ego_vehicle (Node)

Spawns an ego vehicle with sensors attached and waits for world information.

Subscribed to:


carla_infrastructure.launch

Spawns infrastructure sensors and requires the argument infrastructure_sensor_definition_file with the location of a .json file describing these sensors.

/carla_infrastructure (Node)

Spawns the infrastructure sensors passed as arguments.

Subscribed to:


carla_ros_bridge.launch

Creates a node with some basic communications between CARLA and ROS.

carla_ros_bridge (Node)

Publishes the data regarding the current state of the simulation. Reads the debug shapes being drawn.

Subscribed to:

Publishes in:


carla_ros_bridge_with_ackermann_control.launch

Launches two basic nodes. One retrieves simulation data, the other controls a vehicle using AckermannDrive messages.

carla_ros_bridge (Node)

Publishes data regarding the current state of the simulation. Reads the debug shapes being drawn.

Subscribed to:

Publishes in:

/carla_ackermann_control_ego_vehicle (Node)

Converts [AckermannDrive messages](http://docs.ros.org/jade/api/ackermann_msgs/html/msg/AckermannDrive.htm) to [CarlaEgoVehicleControl.msg](../ros_msgs#carlaegovehiclemsg). Speed is in __m/s__, steering angle is in __radians__ and refers to driving angle, not wheel angle.

Subscribed to:

Publishes in:


carla_ros_bridge_with_example_ego_vehicle.launch

Spawns an ego vehicle with sensors attached, and starts communications between CARLA and ROS. Both share current simulation state, sensor and ego vehicle data. The ego vehicle is set ready to be used in manual control.

carla_ros_bridge (Node)

In charge of the communications between CARLA and ROS. They share the current state of the simulation, traffic lights, vehicle controllers and sensor data.

Subscribed to:

Publishes in:

/carla_manual_control_ego_vehicle (Node)

Retrieves information from CARLA regarding the ego vehicle. Uses keyboard input to publish controller messages for the ego vehicle. The information retrieved includes static data, current state, sensor data, and simulation settings.

Subscribed to:

Publishes in:

/carla_ego_vehicle_ego_vehicle (Node)

Spawns an ego vehicle with sensors attached. Reads world information.

Subscribed to:


carla_ros_bridge_with_rviz.launch

Starts communications between CARLA and ROS, and launches RVIZ to retrieve Lidar data.

carla_ros_bridge (Node)

Shares information between CARLA and ROS regarding the current simulation state.

Subscribed to:

Publishes in:

/rviz (Node)

Runs an instance of RVIZ, and waits for Lidar data.

Subscribed to:


carla_manual_control.launch

A ROS version of the CARLA script manual_control.py. It has some prequisites.

  • To display an image, a camera with role-name view and resolution 800x600.
  • To display the position, a gnss sensor with role-name gnss1.
  • To detect other sensor data, the corresponding sensor.

/carla_manual_control_ego_vehicle (Node)

Retrieves information from CARLA regarding the ego vehicle. Uses keyboard input to publish controller messages for the ego vehicle. The information retrieved includes static data, current state, sensor data, and simulation settings.

Subscribed to:

Publishes in:


carla_pcl_recorder.launch

Creates a pointcloud map for the current CARLA level. An autopilot ego vehicle roams around the map with a LIDAR sensor attached.

The point clouds are saved in the /tmp/pcl_capture directory. Once the capture is done, the overall size can be reduced.

#create one point cloud file
pcl_concatenate_points_pcd /tmp/pcl_capture/*.pcd

#filter duplicates
pcl_voxel_grid -leaf 0.1,0.1,0.1 output.pcd map.pcd

#verify the result
pcl_viewer map.pcd

The launch file requires some functionality that is not part of the python egg-file. The PYTHONPATH has to be extended.

export PYTHONPATH=<path-to-carla>/PythonAPI/carla/dist/carla-<version_and_arch>.egg:<path-to-carla>/PythonAPI/carla/

carla_ros_bridge (Node)

In charge of most of the communications between CARLA and ROS. Both share the current state of the simulation, traffic lights, vehicle controllers and sensor data.

Subscribed to:

Publishes in:

/carla_manual_control_ego_vehicle (Node)

Retrieves information from CARLA regarding the ego vehicle. Uses keyboard input to publish controller messages for the ego vehicle. The information retrieved includes static data, current state, sensor data, and simulation settings.

Subscribed to:

Publishes in:

/carla_ego_vehicle_ego_vehicle (Node)

Spawns an ego vehicle with sensors attached. Waits for world information.

Subscribed to:

/enable_autopilot_rostopic (Node)

Changes between autopilot and manual control modes.

Publishes in:

/pcl_recorder_node (Node)

Receives the cloud point data.

Subscribed to:


carla_waypoint_publisher.launch

Calculates a waypoint route for an ego vehicle. The route is published in /carla/<ego vehicle name>/waypoints. The goal is either read from the ROS topic /carla/<ROLE NAME>/goal, or a fixed spawnpoint is used. The prefered way of setting a goal is to click 2D Nav Goal in RVIZ.

The launch file requires some functionality that is not part of the python egg-file. The PYTHONPATH has to be extended.

export PYTHONPATH=$PYTHONPATH:<path-to-carla>/PythonAPI/carla-<carla_version_and_arch>.egg:<path-to-carla>/PythonAPI/carla/

/carla_waypoint_publisher (Node)

Uses the current pose of the ego vehicle as starting point. If the vehicle is respawned or moved, the route is calculated again.

Subscribed to: