Carla Manual Control

The CARLA manual control package is a ROS only version of the manual_control.py script that comes packaged with CARLA. All data is received via ROS topics.


Requirements

To be able to use carla_manual_control, some specific sensors need to be attached to the ego vehicle (see Carla Spawn Objects for information on how to attach sensors to vehicles):

  • to display an image: a camera with role-name rgb_view and resolution 800x600.
  • to display the current position: a GNSS sensor with role-name gnss and an odometry pseudo-sensor with role-name odometry.
  • to get a notification on lane invasions: a lane invasion sensor with role-name lane_invasion.
  • to get a notification on collisons: a collision sensor with role-name collision.

Run the package

To run the package:

1. Make sure you have CARLA runing. Start the ROS bridge:

        # ROS 1
        roslaunch carla_ros_bridge carla_ros_bridge.launch

        # ROS 2
        ros2 launch carla_ros_bridge carla_ros_bridge.launch.py

2. Spawn objects:

        # ROS 1
        roslaunch carla_spawn_objects carla_spawn_objects.launch

        # ROS 2
        ros2 launch carla_spawn_objects carla_spawn_objects.launch.py

3. Launch the carla_manual_control node:

        # ROS 1
        roslaunch carla_manual_control carla_manual_control.launch

        # ROS 2
        ros2 launch carla_manual_control carla_manual_control.launch.py

4. To steer the vehicle manually, press 'B'. Press 'H' to see instructions.

Alternatively, all of the above commands are combined into a separate, single launchfile and can be run at the same time by executing the following:

        # ROS 1
        roslaunch carla_ros_bridge carla_ros_bridge_with_example_ego_vehicle.launch

        # ROS 2
        ros2 launch carla_ros_bridge carla_ros_bridge_with_example_ego_vehicle.launch.py