diff --git a/CHANGELOG.md b/CHANGELOG.md index 988ce10f..ff8d8773 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Latest changed +* rename gnss topic from '../gnss' to '../fix' * Add lane invasion sensor * Add collision sensor * Rename CarlaVehicleControl to CarlaEgoVehicleControl (and add some more message types) diff --git a/README.md b/README.md index 0672a73e..2520c21e 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ This documentation is for CARLA versions *newer* than 0.9.4. #install required ros-dependencies rosdep update - rosdep install --from-path . + rosdep install --from-paths src --ignore-src -r #build catkin_make @@ -124,21 +124,21 @@ Currently the following sensors are supported: |Topic | Type | |-------------------------------|------| -| `/carla//collision` | [carla_ros_bridge.CarlaCollisionEvent](carla_ros_bridge/msg/CarlaCollisionEvent.msg) | +| `/carla//collision` | [carla_ros_bridge_msgs.CarlaCollisionEvent](carla_ros_bridge_msgs/msg/CarlaCollisionEvent.msg) | #### Lane Invasion Sensor |Topic | Type | |-------------------------------|------| -| `/carla//lane_invasion` | [carla_ros_bridge.CarlaLaneInvasionEvent](carla_ros_bridge/msg/CarlaLaneInvasionEvent.msg) | +| `/carla//lane_invasion` | [carla_ros_bridge_msgs.CarlaLaneInvasionEvent](carla_ros_bridge_msgs/msg/CarlaLaneInvasionEvent.msg) | ### Control |Topic | Type | |--------------------------------------|------| -| `/carla//vehicle_control_cmd` (subscriber) | [carla_ros_bridge.CarlaEgoVehicleControl](carla_ros_bridge/msg/CarlaEgoVehicleControl.msg) | -| `/carla//vehicle_status` | [carla_ros_bridge.CarlaEgoVehicleStatus](carla_ros_bridge/msg/CarlaEgoVehicleStatus.msg) | -| `/carla//vehicle_info` | [carla_ros_bridge.CarlaEgoVehicleInfo](carla_ros_bridge/msg/CarlaEgoVehicleInfo.msg) | +| `/carla//vehicle_control_cmd` (subscriber) | [carla_ros_bridge_msgs.CarlaEgoVehicleControl](carla_ros_bridge_msgs/msg/CarlaEgoVehicleControl.msg) | +| `/carla//vehicle_status` | [carla_ros_bridge_msgs.CarlaEgoVehicleStatus](carla_ros_bridge_msgs/msg/CarlaEgoVehicleStatus.msg) | +| `/carla//vehicle_info` | [carla_ros_bridge_msgs.CarlaEgoVehicleInfo](carla_ros_bridge_msgs/msg/CarlaEgoVehicleInfo.msg) | You can stear the ego vehicle from the commandline by publishing to the topic `/carla//vehicle_control_cmd`. diff --git a/carla_ackermann_control/CMakeLists.txt b/carla_ackermann_control/CMakeLists.txt index d8849a4b..5ce1eac4 100644 --- a/carla_ackermann_control/CMakeLists.txt +++ b/carla_ackermann_control/CMakeLists.txt @@ -6,10 +6,9 @@ find_package(catkin REQUIRED COMPONENTS message_generation rospy std_msgs - geometry_msgs ackermann_msgs dynamic_reconfigure - carla_ros_bridge + carla_ros_bridge_msgs ) catkin_python_setup() @@ -26,8 +25,7 @@ add_message_files( generate_messages( DEPENDENCIES std_msgs - geometry_msgs - carla_ros_bridge + carla_ros_bridge_msgs ) generate_dynamic_reconfigure_options( diff --git a/carla_ackermann_control/msg/EgoVehicleControlInfo.msg b/carla_ackermann_control/msg/EgoVehicleControlInfo.msg index ca4e5358..2adebac0 100644 --- a/carla_ackermann_control/msg/EgoVehicleControlInfo.msg +++ b/carla_ackermann_control/msg/EgoVehicleControlInfo.msg @@ -21,4 +21,4 @@ EgoVehicleControlCurrent current EgoVehicleControlStatus status # the current control output to CARLA -carla_ros_bridge/CarlaEgoVehicleControl output +carla_ros_bridge_msgs/CarlaEgoVehicleControl output diff --git a/carla_ackermann_control/package.xml b/carla_ackermann_control/package.xml index 03598028..4bf299b9 100644 --- a/carla_ackermann_control/package.xml +++ b/carla_ackermann_control/package.xml @@ -7,13 +7,14 @@ MIT catkin rospy + carla_ros_bridge_msgs rospy rospy ackermann_msgs carla_ros_bridge std_msgs - geometry_msgs dynamic_reconfigure + carla_ros_bridge_msgs diff --git a/carla_ackermann_control/src/carla_ackermann_control/carla_ackermann_control_node.py b/carla_ackermann_control/src/carla_ackermann_control/carla_ackermann_control_node.py index 6d3c4f6b..ad0e9ff2 100755 --- a/carla_ackermann_control/src/carla_ackermann_control/carla_ackermann_control_node.py +++ b/carla_ackermann_control/src/carla_ackermann_control/carla_ackermann_control_node.py @@ -18,9 +18,9 @@ from dynamic_reconfigure.server import Server from ackermann_msgs.msg import AckermannDrive -from carla_ros_bridge.msg import CarlaEgoVehicleStatus # pylint: disable=no-name-in-module,import-error -from carla_ros_bridge.msg import CarlaEgoVehicleControl # pylint: disable=no-name-in-module,import-error -from carla_ros_bridge.msg import CarlaEgoVehicleInfo # pylint: disable=no-name-in-module,import-error +from carla_ros_bridge_msgs.msg import CarlaEgoVehicleStatus # pylint: disable=no-name-in-module,import-error +from carla_ros_bridge_msgs.msg import CarlaEgoVehicleControl # pylint: disable=no-name-in-module,import-error +from carla_ros_bridge_msgs.msg import CarlaEgoVehicleInfo # pylint: disable=no-name-in-module,import-error from carla_ackermann_control.msg import EgoVehicleControlInfo # pylint: disable=no-name-in-module,import-error from carla_ackermann_control.cfg import EgoVehicleControlParameterConfig # pylint: disable=no-name-in-module,import-error import carla_control_physics as phys # pylint: disable=relative-import diff --git a/carla_ego_vehicle/CMakeLists.txt b/carla_ego_vehicle/CMakeLists.txt index 2cf054c1..d8d3abc6 100644 --- a/carla_ego_vehicle/CMakeLists.txt +++ b/carla_ego_vehicle/CMakeLists.txt @@ -15,7 +15,6 @@ catkin_package( catkin_install_python(PROGRAMS src/carla_ego_vehicle/carla_example_ego_vehicle.py src/carla_ego_vehicle/carla_ego_vehicle_base.py - src/carla_ego_vehicle/carla_ros_manual_control.py DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) diff --git a/carla_ego_vehicle/README.md b/carla_ego_vehicle/README.md index e6f6b650..cb1a4c5d 100644 --- a/carla_ego_vehicle/README.md +++ b/carla_ego_vehicle/README.md @@ -1,13 +1,5 @@ # ROS Ego Vehicle -This package provides two ROS nodes: - -- Carla Example Ego Vehicle: A reference client for spawning an ego vehicle -- Carla ROS Manual Control: a ROS-only manual control - - -## Carla Example Ego Vehicle - The reference Carla client `carla_example_ego_vehicle` can be used to spawn an ego vehicle (role-name: "ego_vehicle") with the following sensors attached to it. - GNSS @@ -16,7 +8,7 @@ The reference Carla client `carla_example_ego_vehicle` can be used to spawn an e - Collision Sensor - Lane Invasion Sensor -Info: To be able to use carla_ros_manual_control a camera with role-name 'view' is required. +Info: To be able to use `carla_manual_control` a camera with role-name 'view' and resolution of 800x600 is required. If no specific position is set, the ego vehicle is spawned at a random position. @@ -47,21 +39,3 @@ The format is a list of dictionaries. One dictionary has the values as follows: } -## Carla ROS Manual Control - -The node `carla_ros_manual_control` is a ROS-only version of the Carla `manual_control.py`. All data is received -via ROS topics. - -Note: To be able to use carla_ros_manual_control a camera with role-name 'view' needs to be spawned by `carla_ego_vehicle`. - - -### Manual steering - -In order to steer manually, you might need to disable sending vehicle control commands within another ROS node. - -Therefore the manual control is able to publish to `/vehicle_control_manual_override` ([std_msgs/Bool](http://docs.ros.org/api/std_msgs/html/msg/Bool.html)). - -Press `B` to toggle the value. - -Note: As sending the vehicle control commands is highly dependent on your setup, you need to implement the subscriber to that topic yourself. - diff --git a/carla_ego_vehicle/launch/carla_ros_manual_control.launch b/carla_ego_vehicle/launch/carla_ros_manual_control.launch deleted file mode 100644 index c5310b54..00000000 --- a/carla_ego_vehicle/launch/carla_ros_manual_control.launch +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/carla_ego_vehicle/src/carla_ego_vehicle/carla_ego_vehicle_base.py b/carla_ego_vehicle/src/carla_ego_vehicle/carla_ego_vehicle_base.py index 59827113..7ca898df 100644 --- a/carla_ego_vehicle/src/carla_ego_vehicle/carla_ego_vehicle_base.py +++ b/carla_ego_vehicle/src/carla_ego_vehicle/carla_ego_vehicle_base.py @@ -151,12 +151,12 @@ def setup_sensors(self, sensors): roll=sensor_spec['roll'], yaw=sensor_spec['yaw']) elif sensor_spec['type'].startswith('sensor.lidar'): - bp.set_attribute('range', '200') - bp.set_attribute('rotation_frequency', '10') - bp.set_attribute('channels', '32') - bp.set_attribute('upper_fov', '15') - bp.set_attribute('lower_fov', '-30') - bp.set_attribute('points_per_second', '500000') + bp.set_attribute('range', str(sensor_spec['range'])) + bp.set_attribute('rotation_frequency', str(sensor_spec['rotation_frequency'])) + bp.set_attribute('channels', str(sensor_spec['channels'])) + bp.set_attribute('upper_fov', str(sensor_spec['upper_fov'])) + bp.set_attribute('lower_fov', str(sensor_spec['lower_fov'])) + bp.set_attribute('points_per_second', str(sensor_spec['points_per_second'])) sensor_location = carla.Location(x=sensor_spec['x'], y=sensor_spec['y'], z=sensor_spec['z']) sensor_rotation = carla.Rotation(pitch=sensor_spec['pitch'], diff --git a/carla_ego_vehicle/src/carla_ego_vehicle/carla_example_ego_vehicle.py b/carla_ego_vehicle/src/carla_ego_vehicle/carla_example_ego_vehicle.py index 7d0eb2e7..f6eab606 100755 --- a/carla_ego_vehicle/src/carla_ego_vehicle/carla_example_ego_vehicle.py +++ b/carla_ego_vehicle/src/carla_ego_vehicle/carla_example_ego_vehicle.py @@ -40,7 +40,7 @@ def sensors(self): }, { 'type': 'sensor.lidar.ray_cast', - 'role_name': 'front', + 'role_name': 'lidar1', 'x': 0.0, 'y': 0.0, 'z': 2.4, 'roll': 0.0, 'pitch': 0.0, 'yaw': 0.0, 'range': 5000, 'channels': 32, @@ -51,17 +51,17 @@ def sensors(self): }, { 'type': 'sensor.other.gnss', - 'role_name': 'sensor', + 'role_name': 'gnss1', 'x': 1.0, 'y': 0.0, 'z': 2.0 }, { 'type': 'sensor.other.collision', - 'role_name': 'sensor', + 'role_name': 'collision1', 'x': 0.0, 'y': 0.0, 'z': 0.0 }, { 'type': 'sensor.other.lane_invasion', - 'role_name': 'sensor', + 'role_name': 'laneinvasion1', 'x': 0.0, 'y': 0.0, 'z': 0.0 } ] diff --git a/carla_manual_control/CMakeLists.txt b/carla_manual_control/CMakeLists.txt new file mode 100644 index 00000000..4332af95 --- /dev/null +++ b/carla_manual_control/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 2.8.3) +project(carla_manual_control) + +find_package(catkin REQUIRED COMPONENTS + rospy +) + +catkin_python_setup() + +catkin_package( + CATKIN_DEPENDS + rospy +) + +catkin_install_python(PROGRAMS + src/carla_manual_control/carla_manual_control.py + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +) + +install(DIRECTORY launch/ + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch +) diff --git a/carla_manual_control/README.md b/carla_manual_control/README.md new file mode 100644 index 00000000..7073e101 --- /dev/null +++ b/carla_manual_control/README.md @@ -0,0 +1,23 @@ +# Carla Manual Control + +The node `carla_manual_control` is a ROS-only version of the Carla `manual_control.py`. All data is received +via ROS topics. + +## Prerequistes +To be able to use `carla_manual_control`, some sensors need to be attached to the ego vehicle: +- to display an image: a camera with role-name 'view' and resolution 800x600 +- to display the current gnss position: a gnss sensor with role-name 'gnss1' +- to get a notification on lane invasions: a lane invasion sensor +- to get a notification on lane invasions: a collision sensor + + +## Manual steering + +In order to steer manually, you might need to disable sending vehicle control commands within another ROS node. + +Therefore the manual control is able to publish to `/vehicle_control_manual_override` ([std_msgs/Bool](http://docs.ros.org/api/std_msgs/html/msg/Bool.html)). + +Press `B` to toggle the value. + +Note: As sending the vehicle control commands is highly dependent on your setup, you need to implement the subscriber to that topic yourself. + diff --git a/carla_manual_control/launch/carla_manual_control.launch b/carla_manual_control/launch/carla_manual_control.launch new file mode 100644 index 00000000..3118eb07 --- /dev/null +++ b/carla_manual_control/launch/carla_manual_control.launch @@ -0,0 +1,7 @@ + + + + + + + diff --git a/carla_manual_control/package.xml b/carla_manual_control/package.xml new file mode 100644 index 00000000..986d1f63 --- /dev/null +++ b/carla_manual_control/package.xml @@ -0,0 +1,17 @@ + + + carla_manual_control + 0.0.0 + The carla_manual_control package + CARLA Simulator Team + MIT + catkin + rospy + rospy + rospy + carla_ros_bridge_msgs + sensor_msgs + std_msgs + + + diff --git a/carla_manual_control/setup.py b/carla_manual_control/setup.py new file mode 100644 index 00000000..f77026e1 --- /dev/null +++ b/carla_manual_control/setup.py @@ -0,0 +1,10 @@ +from distutils.core import setup +from catkin_pkg.python_setup import generate_distutils_setup + +d = generate_distutils_setup( + packages=['carla_manual_control'], + package_dir={'': 'src'} +) + +setup(**d) + diff --git a/carla_manual_control/src/carla_manual_control/__init__.py b/carla_manual_control/src/carla_manual_control/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/carla_ego_vehicle/src/carla_ego_vehicle/carla_ros_manual_control.py b/carla_manual_control/src/carla_manual_control/carla_manual_control.py similarity index 94% rename from carla_ego_vehicle/src/carla_ego_vehicle/carla_ros_manual_control.py rename to carla_manual_control/src/carla_manual_control/carla_manual_control.py index 9673deef..bc7e08fa 100755 --- a/carla_ego_vehicle/src/carla_ego_vehicle/carla_ros_manual_control.py +++ b/carla_manual_control/src/carla_manual_control/carla_manual_control.py @@ -37,11 +37,11 @@ from std_msgs.msg import Bool from sensor_msgs.msg import NavSatFix from sensor_msgs.msg import Image -from carla_ros_bridge.msg import CarlaCollisionEvent # pylint: disable=no-name-in-module, import-error -from carla_ros_bridge.msg import CarlaLaneInvasionEvent # pylint: disable=no-name-in-module, import-error -from carla_ros_bridge.msg import CarlaEgoVehicleControl # pylint: disable=no-name-in-module, import-error -from carla_ros_bridge.msg import CarlaEgoVehicleStatus # pylint: disable=no-name-in-module, import-error -from carla_ros_bridge.msg import CarlaEgoVehicleInfo # pylint: disable=no-name-in-module, import-error +from carla_ros_bridge_msgs.msg import CarlaCollisionEvent # pylint: disable=no-name-in-module, import-error +from carla_ros_bridge_msgs.msg import CarlaLaneInvasionEvent # pylint: disable=no-name-in-module, import-error +from carla_ros_bridge_msgs.msg import CarlaEgoVehicleControl # pylint: disable=no-name-in-module, import-error +from carla_ros_bridge_msgs.msg import CarlaEgoVehicleStatus # pylint: disable=no-name-in-module, import-error +from carla_ros_bridge_msgs.msg import CarlaEgoVehicleInfo # pylint: disable=no-name-in-module, import-error try: import pygame @@ -277,9 +277,12 @@ def __init__(self, width, height): "/carla/ego_vehicle/vehicle_info", CarlaEgoVehicleInfo, self.vehicle_info_updated) self.latitude = 0 self.longitude = 0 + self.manual_control = False self.gnss_subscriber = rospy.Subscriber( - "/carla/ego_vehicle/gnss/front/gnss", NavSatFix, self.gnss_updated) + "/carla/ego_vehicle/gnss/gnss1/fix", NavSatFix, self.gnss_updated) self.tf_listener = tf.TransformListener() + self.manual_control_subscriber = rospy.Subscriber( + "/vehicle_control_manual_override", Bool, self.manual_control_override_updated) def __del__(self): self.gnss_subscriber.unregister() @@ -292,6 +295,13 @@ def tick(self, clock): """ self._notifications.tick(clock) + def manual_control_override_updated(self, data): + """ + Callback on vehicle status updates + """ + self.manual_control = data.data + self.update_info_text() + def vehicle_status_updated(self, vehicle_status): """ Callback on vehicle status updates @@ -356,7 +366,9 @@ def update_info_text(self): ('Hand brake:', self.vehicle_status.control.hand_brake), ('Manual:', self.vehicle_status.control.manual_gear_shift), 'Gear: %s' % {-1: 'R', 0: 'N'}.get(self.vehicle_status.control.gear, - self.vehicle_status.control.gear)] + self.vehicle_status.control.gear), + ''] + self._info_text += [('Manual ctrl:', self.manual_control)] def toggle_info(self): """ @@ -506,7 +518,7 @@ def main(): """ main function """ - rospy.init_node('carla_ros_manual_control') + rospy.init_node('carla_manual_control') # resolution should be similar to spawned camera with role-name 'view' resolution = {"width": 800, "height": 600} diff --git a/carla_ros_bridge/CMakeLists.txt b/carla_ros_bridge/CMakeLists.txt index 230a2bad..307c0328 100644 --- a/carla_ros_bridge/CMakeLists.txt +++ b/carla_ros_bridge/CMakeLists.txt @@ -3,7 +3,6 @@ project(carla_ros_bridge) ## Find catkin macros and libraries find_package(catkin REQUIRED COMPONENTS - message_generation rospy sensor_msgs geometry_msgs @@ -13,23 +12,6 @@ find_package(catkin REQUIRED COMPONENTS catkin_python_setup() -add_message_files( - FILES - CarlaEgoVehicleControl.msg - CarlaEgoVehicleStatus.msg - CarlaEgoVehicleInfoWheel.msg - CarlaEgoVehicleInfo.msg - CarlaCollisionEvent.msg - CarlaLaneInvasionEvent.msg -) - -generate_messages( - DEPENDENCIES - std_msgs - geometry_msgs -) - - catkin_package() diff --git a/carla_ros_bridge/launch/carla_ros_bridge_with_example_ego_vehicle.launch b/carla_ros_bridge/launch/carla_ros_bridge_with_example_ego_vehicle.launch index 6684f67e..678c92c9 100644 --- a/carla_ros_bridge/launch/carla_ros_bridge_with_example_ego_vehicle.launch +++ b/carla_ros_bridge/launch/carla_ros_bridge_with_example_ego_vehicle.launch @@ -2,5 +2,5 @@ - + diff --git a/carla_ros_bridge/package.xml b/carla_ros_bridge/package.xml index dcc126e8..662c285d 100644 --- a/carla_ros_bridge/package.xml +++ b/carla_ros_bridge/package.xml @@ -22,6 +22,7 @@ tf2_msgs rosgraph_msgs cv_bridge + carla_ros_bridge_msgs diff --git a/carla_ros_bridge/src/carla_ros_bridge/collision_sensor.py b/carla_ros_bridge/src/carla_ros_bridge/collision_sensor.py index d397acf3..f9875352 100644 --- a/carla_ros_bridge/src/carla_ros_bridge/collision_sensor.py +++ b/carla_ros_bridge/src/carla_ros_bridge/collision_sensor.py @@ -11,7 +11,7 @@ """ from carla_ros_bridge.sensor import Sensor -from carla_ros_bridge.msg import CarlaCollisionEvent # pylint: disable=no-name-in-module,import-error +from carla_ros_bridge_msgs.msg import CarlaCollisionEvent # pylint: disable=no-name-in-module,import-error class CollisionSensor(Sensor): diff --git a/carla_ros_bridge/src/carla_ros_bridge/ego_vehicle.py b/carla_ros_bridge/src/carla_ros_bridge/ego_vehicle.py index a626a16c..4ad49e1a 100644 --- a/carla_ros_bridge/src/carla_ros_bridge/ego_vehicle.py +++ b/carla_ros_bridge/src/carla_ros_bridge/ego_vehicle.py @@ -20,10 +20,10 @@ from carla import VehicleControl from carla_ros_bridge.vehicle import Vehicle -from carla_ros_bridge.msg import CarlaEgoVehicleInfo # pylint: disable=no-name-in-module,import-error -from carla_ros_bridge.msg import CarlaEgoVehicleInfoWheel # pylint: disable=no-name-in-module,import-error -from carla_ros_bridge.msg import CarlaEgoVehicleControl # pylint: disable=no-name-in-module,import-error -from carla_ros_bridge.msg import CarlaEgoVehicleStatus # pylint: disable=no-name-in-module,import-error +from carla_ros_bridge_msgs.msg import CarlaEgoVehicleInfo # pylint: disable=no-name-in-module,import-error +from carla_ros_bridge_msgs.msg import CarlaEgoVehicleInfoWheel # pylint: disable=no-name-in-module,import-error +from carla_ros_bridge_msgs.msg import CarlaEgoVehicleControl # pylint: disable=no-name-in-module,import-error +from carla_ros_bridge_msgs.msg import CarlaEgoVehicleStatus # pylint: disable=no-name-in-module,import-error class EgoVehicle(Vehicle): @@ -193,7 +193,7 @@ def control_command_updated(self, ros_vehicle_control): It's just forwarding the ROS input to CARLA :param ros_vehicle_control: current vehicle control input received via ROS - :type ros_vehicle_control: carla_ros_bridge.msg.CarlaEgoVehicleControl + :type ros_vehicle_control: carla_ros_bridge_msgs.msg.CarlaEgoVehicleControl :return: """ vehicle_control = VehicleControl() diff --git a/carla_ros_bridge/src/carla_ros_bridge/gnss.py b/carla_ros_bridge/src/carla_ros_bridge/gnss.py index 1f9ba915..5b4d4a09 100644 --- a/carla_ros_bridge/src/carla_ros_bridge/gnss.py +++ b/carla_ros_bridge/src/carla_ros_bridge/gnss.py @@ -55,4 +55,4 @@ def sensor_data_updated(self, carla_gnss_event): navsatfix_msg.longitude = carla_gnss_event.longitude navsatfix_msg.altitude = carla_gnss_event.altitude self.publish_ros_message( - self.topic_name() + "/gnss", navsatfix_msg) + self.topic_name() + "/fix", navsatfix_msg) diff --git a/carla_ros_bridge/src/carla_ros_bridge/lane_invasion_sensor.py b/carla_ros_bridge/src/carla_ros_bridge/lane_invasion_sensor.py index e0c9bc08..0110af3a 100644 --- a/carla_ros_bridge/src/carla_ros_bridge/lane_invasion_sensor.py +++ b/carla_ros_bridge/src/carla_ros_bridge/lane_invasion_sensor.py @@ -11,7 +11,7 @@ """ from carla_ros_bridge.sensor import Sensor -from carla_ros_bridge.msg import CarlaLaneInvasionEvent # pylint: disable=no-name-in-module,import-error +from carla_ros_bridge_msgs.msg import CarlaLaneInvasionEvent # pylint: disable=no-name-in-module,import-error class LaneInvasionSensor(Sensor): diff --git a/carla_ros_bridge_lifecycle/src/carla_ros_bridge_lifecycle/carla_ros_bridge_lifecycle.py b/carla_ros_bridge_lifecycle/src/carla_ros_bridge_lifecycle/carla_ros_bridge_lifecycle.py index a986741d..dc2846a5 100755 --- a/carla_ros_bridge_lifecycle/src/carla_ros_bridge_lifecycle/carla_ros_bridge_lifecycle.py +++ b/carla_ros_bridge_lifecycle/src/carla_ros_bridge_lifecycle/carla_ros_bridge_lifecycle.py @@ -17,7 +17,7 @@ import rospy import roslaunch -from carla_ros_bridge.msg import CarlaEgoVehicleControl # pylint: disable=no-name-in-module,import-error +from carla_ros_bridge_msgs.msg import CarlaEgoVehicleControl # pylint: disable=no-name-in-module,import-error class RosBridgeLifecycle(object): diff --git a/carla_ros_bridge_msgs/CMakeLists.txt b/carla_ros_bridge_msgs/CMakeLists.txt new file mode 100644 index 00000000..5ef9b89b --- /dev/null +++ b/carla_ros_bridge_msgs/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 2.8.3) +project(carla_ros_bridge_msgs) + +## Find catkin macros and libraries +find_package(catkin REQUIRED COMPONENTS + message_generation + std_msgs + geometry_msgs +) + +add_message_files( + DIRECTORY msg + FILES + CarlaEgoVehicleControl.msg + CarlaEgoVehicleStatus.msg + CarlaEgoVehicleInfoWheel.msg + CarlaEgoVehicleInfo.msg + CarlaCollisionEvent.msg + CarlaLaneInvasionEvent.msg +) + +generate_messages( + DEPENDENCIES + std_msgs + geometry_msgs +) + + +catkin_package( + CATKIN_DEPENDS + message_runtime + std_msgs + geometry_msgs +) diff --git a/carla_ros_bridge/msg/CarlaCollisionEvent.msg b/carla_ros_bridge_msgs/msg/CarlaCollisionEvent.msg similarity index 100% rename from carla_ros_bridge/msg/CarlaCollisionEvent.msg rename to carla_ros_bridge_msgs/msg/CarlaCollisionEvent.msg diff --git a/carla_ros_bridge/msg/CarlaEgoVehicleControl.msg b/carla_ros_bridge_msgs/msg/CarlaEgoVehicleControl.msg similarity index 100% rename from carla_ros_bridge/msg/CarlaEgoVehicleControl.msg rename to carla_ros_bridge_msgs/msg/CarlaEgoVehicleControl.msg diff --git a/carla_ros_bridge/msg/CarlaEgoVehicleInfo.msg b/carla_ros_bridge_msgs/msg/CarlaEgoVehicleInfo.msg similarity index 100% rename from carla_ros_bridge/msg/CarlaEgoVehicleInfo.msg rename to carla_ros_bridge_msgs/msg/CarlaEgoVehicleInfo.msg diff --git a/carla_ros_bridge/msg/CarlaEgoVehicleInfoWheel.msg b/carla_ros_bridge_msgs/msg/CarlaEgoVehicleInfoWheel.msg similarity index 100% rename from carla_ros_bridge/msg/CarlaEgoVehicleInfoWheel.msg rename to carla_ros_bridge_msgs/msg/CarlaEgoVehicleInfoWheel.msg diff --git a/carla_ros_bridge/msg/CarlaEgoVehicleStatus.msg b/carla_ros_bridge_msgs/msg/CarlaEgoVehicleStatus.msg similarity index 100% rename from carla_ros_bridge/msg/CarlaEgoVehicleStatus.msg rename to carla_ros_bridge_msgs/msg/CarlaEgoVehicleStatus.msg diff --git a/carla_ros_bridge/msg/CarlaLaneInvasionEvent.msg b/carla_ros_bridge_msgs/msg/CarlaLaneInvasionEvent.msg similarity index 100% rename from carla_ros_bridge/msg/CarlaLaneInvasionEvent.msg rename to carla_ros_bridge_msgs/msg/CarlaLaneInvasionEvent.msg diff --git a/carla_ros_bridge_msgs/package.xml b/carla_ros_bridge_msgs/package.xml new file mode 100644 index 00000000..9a293d76 --- /dev/null +++ b/carla_ros_bridge_msgs/package.xml @@ -0,0 +1,15 @@ + + + carla_ros_bridge_msgs + 0.1.0 + The carla_ros_bridge_msgs package + CARLA Simulator Team + MIT + catkin + message_generation + std_msgs + geometry_msgs + message_runtime + std_msgs + geometry_msgs +