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.html) to [CarlaEgoVehicleControl.msg](ros_msgs.md#carlaegovehiclecontrolmsg). Speed is in __m/s__, steering angle in __radians__ and refers to driving angle, not wheel angle.Subscribed to:
- /carla/ego_vehicle/ackermann_cmd — ackermann_msgs.AckermannDrive
- /carla/ego_vehicle/vehicle_info — carla_msgs.CarlaEgoVehicleInfo
- /carla/ego_vehicle/vehicle_status — carla_msgs.CarlaEgoVehicleStatus
Publishes in:
- /carla/ego_vehicle/ackermann_control/parameter_descriptions — dynamic_reconfigure/ConfigDescription
- /carla/ego_vehicle/ackermann_control/control_info — carla_ackermann_control.EgoVehicleControlInfo
- /carla/ego_vehicle/ackermann_control/parameter_updates — dynamic_reconfigure/Config
- /carla/ego_vehicle/vehicle_control_cmd — carla_msgs.CarlaEgoVehicleControl
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/ego_vehicle/initialpose — geometry_msgs/PoseWithCovarianceStamped
- /carla/world_info — carla_msgs.CarlaWorldInfo
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/ego_vehicle/initialpose — geometry_msgs/PoseWithCovarianceStamped
- /carla/world_info — carla_msgs.CarlaWorldInfo
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/world_info — carla_msgs.CarlaWorldInfo
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:
- /carla/debug_marker — visualization_msgs.MarkerArray
Publishes in:
- /carla/actor_list — carla_msgs.CarlaActorList
- /carla/objects — derived_object_msgs.ObjectArrayring
- /carla/status — carla_msgs.CarlaStatus
- /carla/traffic_lights — carla_msgs.CarlaTrafficLightStatusList
- /carla/world_info — carla_msgs.CarlaWorldInfo
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:
- /carla/debug_marker — visualization_msgs.MarkerArray
Publishes in:
- /carla/actor_list — carla_msgs.CarlaActorList
- /carla/objects — derived_object_msgs.ObjectArrayring
- /carla/status — carla_msgs.CarlaStatus
- /carla/traffic_lights — carla_msgs.CarlaTrafficLightStatusList
- /carla/world_info — carla_msgs.CarlaWorldInfo
/carla_ackermann_control_ego_vehicle (Node)
Converts [AckermannDrive messages](http://docs.ros.org/jade/api/ackermann_msgs/html/msg/AckermannDrive.html) to [CarlaEgoVehicleControl.msg](ros_msgs.md#carlaegovehiclemsg). Speed is in __m/s__, steering angle is in __radians__ and refers to driving angle, not wheel angle.Subscribed to:
- /carla/ego_vehicle/ackermann_cmd — ackermann_msgs.AckermannDrive
- /carla/ego_vehicle/vehicle_info — carla_msgs.CarlaEgoVehicleInfo
- /carla/ego_vehicle/vehicle_status — carla_msgs.CarlaEgoVehicleStatus
Publishes in:
- /carla/ego_vehicle/ackermann_control/parameter_descriptions — dynamic_reconfigure/ConfigDescription
- /carla/ego_vehicle/ackermann_control/control_info — carla_ackermann_control.EgoVehicleControlInfo
- /carla/ego_vehicle/ackermann_control/parameter_updates — dynamic_reconfigure/Config
- /carla/ego_vehicle/vehicle_control_cmd — carla_msgs.CarlaEgoVehicleControl
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:
- /carla/debug_marker — visualization_msgs.MarkerArray
- /carla/ego_vehicle/enable_autopilot — std_msgs.Bool
- /carla/ego_vehicle/twist — geometry_msgs.Twist
- /carla/ego_vehicle/vehicle_control_cmd — carla_msgs.CarlaEgoVehicleControl
- /carla/ego_vehicle/vehicle_control_cmd_manual — carla_msgs.CarlaEgoVehicleControl
- /carla/ego_vehicle/vehicle_control_manual_override — std_msgs.Bool
Publishes in:
- /carla/actor_list — carla_msgs.CarlaActorList
- /carla/ego_vehicle/camera/rgb/front/camera_info — sensor_msgs.CameraInfo
- /carla/ego_vehicle/camera/rgb/front/image_color — sensor_msgs.Image
- /carla/ego_vehicle/camera/rgb/view/camera_info — sensor_msgs.CameraInfo
- /carla/ego_vehicle/camera/rgb/view/image_color — sensor_msgs.Image
- /carla/ego_vehicle/gnss/gnss1/fix — sensor_msgs.NavSatFix
- /carla/ego_vehicle/imu — sensor_msgs.Imu
- /carla/ego_vehicle/lidar/lidar1/point_cloud — sensor_msgs.PointCloud2
- /carla/ego_vehicle/objects — derived_object_msgs.ObjectArray
- /carla/ego_vehicle/odometry — nav_msgs.Odometry
- /carla/ego_vehicle/radar/front/radar — ainstein_radar_msgs.RadarTargetArray
- /carla/ego_vehicle/vehicle_info — carla_msgs.CarlaEgoVehicleInfo
- /carla/ego_vehicle/vehicle_status — carla_msgs.CarlaEgoVehicleStatus
- /carla/objects — derived_object_msgs.ObjectArrayring
- /carla/status — carla_msgs.CarlaStatus
- /carla/traffic_lights — carla_msgs.CarlaTrafficLightStatusList
- /carla/world_info — carla_msgs.CarlaWorldInfo
/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:
- /carla/ego_vehicle/camera/rgb/view/image_color — sensor_msgs.Image
- /carla/ego_vehicle/collision — carla_msgs.CarlaCollisionEvent
- /carla/ego_vehicle/gnss/gnss1/fix — sensor_msgs.NavSatFix
- /carla/ego_vehicle/lane_invasion — carla_msgs.CarlaLaneInvasionEvent
- /carla/ego_vehicle/vehicle_control_manual_override — std_msgs.Bool
- /carla/ego_vehicle/vehicle_info — carla_msgs.CarlaEgoVehicleInfo
- /carla/ego_vehicle/vehicle_status — carla_msgs.CarlaEgoVehicleStatus
- /carla/status — carla_msgs.CarlaStatus
Publishes in:
- /carla/ego_vehicle/enable_autopilot — std_msgs.Bool
- /carla/ego_vehicle/vehicle_control_cmd_manual — carla_msgs.CarlaEgoVehicleControl
- /carla/ego_vehicle/vehicle_control_manual_override — std_msgs.Bool
/carla_ego_vehicle_ego_vehicle (Node)
Spawns an ego vehicle with sensors attached. Reads world information.Subscribed to:
- /carla/ego_vehicle/initialpose — geometry_msgs/PoseWithCovarianceStamped
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:
- /carla/debug_marker — visualization_msgs.MarkerArray
Publishes in:
- /carla/actor_list — carla_msgs.CarlaActorList
- /carla/objects — derived_object_msgs.ObjectArrayring
- /carla/status — carla_msgs.CarlaStatus
- /carla/traffic_lights — carla_msgs.CarlaTrafficLightStatusList
- /carla/world_info — carla_msgs.CarlaWorldInfo
/rviz (Node)
Runs an instance of RVIZ, and waits for Lidar data.Subscribed to:
- /carla/vehicle_marker — visualization_msgs/Marker
- /carla/vehicle_marker_array — visualization_msgs/MarkerArray
- /carla/ego_vehicle/lidar/front/point_cloud — sensor_msgs.PointCloud2
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:
- /carla/ego_vehicle/camera/rgb/view/image_color — sensor_msgs.Image
- /carla/ego_vehicle/collision — carla_msgs.CarlaCollisionEvent
- /carla/ego_vehicle/gnss/gnss1/fix — sensor_msgs.NavSatFix
- /carla/ego_vehicle/lane_invasion — carla_msgs.CarlaLaneInvasionEvent
- /carla/ego_vehicle/vehicle_control_manual_override — std_msgs.Bool
- /carla/ego_vehicle/vehicle_info — carla_msgs.CarlaEgoVehicleInfo
- /carla/ego_vehicle/vehicle_status — carla_msgs.CarlaEgoVehicleStatus
- /carla/status — carla_msgs.CarlaStatus
Publishes in:
- /carla/ego_vehicle/enable_autopilot — std_msgs.Bool
- /carla/ego_vehicle/vehicle_control_cmd_manual — carla_msgs.CarlaEgoVehicleControl
- /carla/ego_vehicle/vehicle_control_manual_override — std_msgs.Bool
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:
- /carla/debug_marker — visualization_msgs.MarkerArray
- /carla/ego_vehicle/enable_autopilot — std_msgs.Bool
- /carla/ego_vehicle/twist — geometry_msgs.Twist
- /carla/ego_vehicle/vehicle_control_cmd — carla_msgs.CarlaEgoVehicleControl
- /carla/ego_vehicle/vehicle_control_cmd_manual — carla_msgs.CarlaEgoVehicleControl
- /carla/ego_vehicle/vehicle_control_manual_override — std_msgs.Bool
Publishes in:
- /carla/actor_list — carla_msgs.CarlaActorList
- /carla/ego_vehicle/camera/rgb/front/camera_info — sensor_msgs.CameraInfo
- /carla/ego_vehicle/camera/rgb/front/image_color — sensor_msgs.Image
- /carla/ego_vehicle/camera/rgb/view/camera_info — sensor_msgs.CameraInfo
- /carla/ego_vehicle/camera/rgb/view/image_color — sensor_msgs.Image
- /carla/ego_vehicle/gnss/gnss1/fix — sensor_msgs.NavSatFix
- /carla/ego_vehicle/imu — sensor_msgs.Imu
- /carla/ego_vehicle/lidar/lidar1/point_cloud — sensor_msgs.PointCloud2
- /carla/ego_vehicle/objects — derived_object_msgs.ObjectArray
- /carla/ego_vehicle/odometry — nav_msgs.Odometry
- /carla/ego_vehicle/vehicle_status — carla_msgs.CarlaEgoVehicleStatus
- /carla/ego_vehicle/radar/front/radar — ainstein_radar_msgs.RadarTargetArray
- /carla/ego_vehicle/vehicle_info — carla_msgs.CarlaEgoVehicleInfo
- /carla/marker — visualization_msgs.Marker
- /carla/objects — derived_object_msgs.ObjectArrayring
- /carla/status — carla_msgs.CarlaStatus
- /carla/traffic_lights — carla_msgs.CarlaTrafficLightStatusList
- /carla/world_info — carla_msgs.CarlaWorldInfo
/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:
- /carla/ego_vehicle/camera/rgb/view/image_color — sensor_msgs.Image
- /carla/ego_vehicle/collision — carla_msgs.CarlaCollisionEvent
- /carla/ego_vehicle/gnss/gnss1/fix — sensor_msgs.NavSatFix
- /carla/ego_vehicle/lane_invasion — carla_msgs.CarlaLaneInvasionEvent
- /carla/ego_vehicle/vehicle_control_manual_override — std_msgs.Bool
- /carla/ego_vehicle/vehicle_info — carla_msgs.CarlaEgoVehicleInfo
- /carla/ego_vehicle/vehicle_status — carla_msgs.CarlaEgoVehicleStatus
- /carla/status — carla_msgs.CarlaStatus
Publishes in:
- /carla/ego_vehicle/enable_autopilot — std_msgs.Bool
- /carla/ego_vehicle/vehicle_control_cmd_manual — carla_msgs.CarlaEgoVehicleControl
- /carla/ego_vehicle/vehicle_control_manual_override — std_msgs.Bool
/carla_ego_vehicle_ego_vehicle (Node)
Spawns an ego vehicle with sensors attached. Waits for world information.Subscribed to:
- /carla/ego_vehicle/initialpose — geometry_msgs/PoseWithCovarianceStamped
/enable_autopilot_rostopic (Node)
Changes between autopilot and manual control modes.Publishes in:
- /carla/ego_vehicle/enable_autopilot — std_msgs.Bool
/pcl_recorder_node (Node)
Receives the cloud point data.Subscribed to:
- /carla/ego_vehicle/lidar/lidar1/point_cloud — sensor_msgs.PointCloud2
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:
- /carla/world_info — carla_msgs.CarlaWorldInfo