The RVIZ plugin provides a visualization tool based on the RVIZ ROS package.
The RVIZ plugin expects an ego vehicle named ego_vehicle
. To see an example of ROS-bridge working with RVIZ, execute the following commands with a CARLA server running:
1. Start the ROS bridge with RVIZ enabled:
# ROS 1
roslaunch carla_ros_bridge carla_ros_bridge.launch
# ROS 2
ros2 launch carla_ros_bridge carla_ros_bridge.launch.py
2. Start RVIZ:
# ROS 1
rosrun rviz rviz
# ROS 2
ros2 run rviz2 rviz2
2. Spawn an ego vehicle with the carla_spawn_objects
package:
# ROS 1
roslaunch carla_spawn_objects carla_spawn_objects.launch
# ROS 2
ros2 launch carla_spawn_objects carla_spawn_objects.launch.py
3. Control the ego vehicle with the carla_manual_control
package (press B
to enable manual steering):
# ROS 1
roslaunch carla_manual_control carla_manual_control.launch
# ROS 2
ros2 launch carla_manual_control carla_manual_control.launch.py
- Visualization of the ego vehicle state - Visualize the vehicle position and control.
- Provide RVIZ view pose to other nodes - With an
actor.pseudo.control
attached to a camera, move the camera around in the CARLA world by publishing a Pose message. - Visualization of sensors - Visualize RGB, LIDAR, depth, DVS and semanatic segmentation camera information.
- Execute scenarios - Use the carla_ros_scenario_runner package to trigger scenarios.
- Play/Pause the simulation - If started in synchronous mode, you can play and pause the simulation.
- Manually override ego vehicle control - Steer the vehicle by mouse by using the drive-widget from the RVIZ Visualization Tutorials and a node to convert from twist to vehicle control.
Topic | Type | Description |
---|---|---|
/carla/status |
carla_msgs/CarlaStatus | Read the current status of CARLA |
/carla/ego_vehicle/vehicle_status |
carla_msgs/CarlaEgoVehicleStatus | Display the current state of the ego vehicle |
/carla/ego_vehicle/odometry |
nav_msgs/Odometry | Display the current pose of the ego vehicle |
/scenario_runner/status |
carla_ros_scenario_runner_types/CarlaScenarioRunnerStatus | Visualize the scenario runner status |
/carla/available_scenarios |
carla_ros_scenario_runner_types/CarlaScenarioList | Provides a list of scenarios to execute (disabled in combo box) |
Topic | Type | Description |
---|---|---|
/carla/control |
carla_msgs/CarlaControl | Play/pause/step CARLA |
/carla/ego_vehicle/spectator_pose |
geometry_msgs/PoseStamped | Publish the current pose of the RVIZ camera view |
/carla/ego_vehicle/vehicle_control_manual_override |
std_msgs/Bool | Enable/disable vehicle control override |
/carla/ego_vehicle/twist |
geometry_msgs/Twist | The twist command, created via mouse |
Topic | Type | Description |
---|---|---|
/scenario_runner/execute_scenario |
carla_ros_scenario_runner_types/ExecuteScenario | Execute the selected scenario |