Skip to content

Commit 59d12f7

Browse files
committed
Extended ROS2 interfaces
- Remove "Ego" from messages, as there is no dedicated ego vehicle anymore. Any vehicle can be controlled via the ROS2 interface if desired. - Adding topic_prefix to CarlaActorInfo.msg to be able to identify the corresponding available actor interfaces. And filled with other blueprint strings (rosname, object_type, base_type). - Extended the reporting on the last applied control to the CarlaVehicleStatus interface. - Extended the CarlaVehicleInfo interface by the shape i.e. of the vertices of the UE-Mesh of the actor. - Add header to CarlaWalkerControl, CarlaTrafficLightStatus, CarlaStatus - Remove last applied control timestamp from VehicleStatus - Added CarlaSynchronizationWindow message - Added CaralV2XCustom* messages - Add LoadMap.srv GetAvailableMaps.srv - Made GetBlueprints.srv to return the complete blueprint information - Use CarlaActorBlueprint type in SpawnObject - Added CarlaEpisodeSettings.msg, SetEpisodeSettings.srv and use that one in CarlaStatus.idl for reporting - Added CarlaSynchronizationWindowParticipantState and report in CarlaStatus and rename synchronous_mode_running -> game_running - Make time entries double to be able to express exact game times - Extend CarlaVehicleStatus.msg to provide also the child_frame_id as Odometry.msg and provide defaults for CarlaVehicleControl.msg - Split CarlaVehicleStatus into Speed, Odometry, CarlaVehicleControlStatus (provides the pseudo.speedometer and pseudo.odom sensors for better backward compatibility and usability) - Add CarlaVehicleTelemetryData.msg
1 parent 081fdcd commit 59d12f7

67 files changed

Lines changed: 1291 additions & 47 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,70 @@
1-
cmake_minimum_required(VERSION 2.8.3)
1+
cmake_minimum_required(VERSION 2.8.12)
22
project(carla_msgs)
33

44
find_package(ros_environment REQUIRED)
55

66
set(ROS_VERSION $ENV{ROS_VERSION})
7+
if (NOT ROS_VERSION)
8+
message(FATAL_ERROR "ROS_VERSION not set. Please source the respective ROS environment before building this component")
9+
return()
10+
endif()
711

8-
set(SERVICE_FILES SpawnObject.srv DestroyObject.srv GetBlueprints.srv)
12+
set(SERVICE_FILES
13+
DestroyObject.srv
14+
GetAvailableMaps.srv
15+
GetBlueprints.srv
16+
LoadMap.srv
17+
SetEpisodeSettings.srv
18+
SpawnObject.srv
19+
)
920

1021
set(MSG_FILES
11-
CarlaBoundingBox.msg
12-
CarlaEgoVehicleControl.msg
13-
CarlaEgoVehicleStatus.msg
14-
CarlaEgoVehicleInfoWheel.msg
15-
CarlaEgoVehicleInfo.msg
16-
CarlaCollisionEvent.msg
17-
CarlaLaneInvasionEvent.msg
18-
CarlaWorldInfo.msg
22+
CarlaActorBlueprint.msg
1923
CarlaActorInfo.msg
2024
CarlaActorList.msg
25+
CarlaBoundingBox.msg
26+
CarlaCollisionEvent.msg
2127
CarlaControl.msg
28+
CarlaEpisodeSettings.msg
29+
CarlaVehicleControl.msg
30+
CarlaVehicleInfo.msg
31+
CarlaVehicleInfoWheel.msg
32+
CarlaVehicleTelemetryData.msg
33+
CarlaVehicleTelemetryDataWheel.msg
34+
CarlaVehicleControlStatus.msg
35+
CarlaLaneInvasionEvent.msg
2236
CarlaStatus.msg
2337
CarlaTrafficLightInfo.msg
2438
CarlaTrafficLightInfoList.msg
2539
CarlaTrafficLightStatus.msg
2640
CarlaTrafficLightStatusList.msg
41+
CarlaSynchronizationWindow.msg
42+
CarlaSynchronizationWindowParticipantState.msg
43+
CarlaV2XByteArray.msg
44+
CarlaV2XCustomData.msg
45+
CarlaV2XCustomDataList.msg
46+
CarlaV2XCustomMessage.msg
47+
CarlaV2XData.msg
48+
CarlaV2XDataList.msg
2749
CarlaWalkerControl.msg
28-
CarlaWeatherParameters.msg)
50+
CarlaWeatherParameters.msg
51+
CarlaWorldInfo.msg
52+
)
2953

3054
if(${ROS_VERSION} EQUAL 1)
3155
cmake_minimum_required(VERSION 2.8.3)
3256

3357
# Find catkin macros and libraries
3458
find_package(catkin REQUIRED COMPONENTS message_generation std_msgs
35-
geometry_msgs diagnostic_msgs)
59+
geometry_msgs diagnostic_msgs shape_msgs ackermann_msgs etsi_its_cam_msgs)
3660

3761
add_service_files(DIRECTORY srv FILES ${SERVICE_FILES})
3862

3963
add_message_files(DIRECTORY msg FILES ${MSG_FILES})
4064

41-
generate_messages(DEPENDENCIES std_msgs geometry_msgs diagnostic_msgs)
65+
generate_messages(DEPENDENCIES std_msgs geometry_msgs diagnostic_msgs shape_msgs ackermann_msgs etsi_its_cam_msgs)
4266

43-
catkin_package(CATKIN_DEPENDS message_runtime std_msgs geometry_msgs diagnostic_msgs)
67+
catkin_package(CATKIN_DEPENDS message_runtime std_msgs geometry_msgs diagnostic_msgs shape_msgs ackermann_msgs etsi_its_cam_msgs)
4468

4569
elseif(${ROS_VERSION} EQUAL 2)
4670

@@ -58,8 +82,11 @@ elseif(${ROS_VERSION} EQUAL 2)
5882
find_package(ament_cmake REQUIRED)
5983
find_package(builtin_interfaces REQUIRED)
6084
find_package(std_msgs REQUIRED)
85+
find_package(shape_msgs REQUIRED)
6186
find_package(geometry_msgs REQUIRED)
87+
find_package(ackermann_msgs REQUIRED)
6288
find_package(diagnostic_msgs REQUIRED)
89+
find_package(etsi_its_cam_msgs REQUIRED)
6390
find_package(rosidl_default_generators REQUIRED)
6491

6592
# Apend "msg/" to each file name
@@ -83,8 +110,11 @@ elseif(${ROS_VERSION} EQUAL 2)
83110
DEPENDENCIES
84111
builtin_interfaces
85112
std_msgs
113+
shape_msgs
86114
geometry_msgs
115+
ackermann_msgs
87116
diagnostic_msgs
117+
etsi_its_cam_msgs
88118
ADD_LINTER_TESTS)
89119

90120
ament_export_dependencies(rosidl_default_runtime)

msg/CarlaActorBlueprint.idl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// generated from rosidl_adapter/resource/msg.idl.em
2+
// with input from carla_msgs/msg/CarlaActorBlueprint.msg
3+
// generated code does not contain a copyright notice
4+
#pragma once
5+
6+
#include "diagnostic_msgs/msg/KeyValue.idl"
7+
8+
module carla_msgs {
9+
module msg {
10+
@verbatim (language="comment", text=
11+
"Copyright (c) 2024 Intel Corporation." "\n"
12+
"" "\n"
13+
"This work is licensed under the terms of the MIT license." "\n"
14+
"For a copy, see <https://opensource.org/licenses/MIT>.")
15+
struct CarlaActorBlueprint {
16+
string id;
17+
18+
sequence<string> tags;
19+
20+
sequence<diagnostic_msgs::msg::KeyValue> attributes;
21+
};
22+
};
23+
};

msg/CarlaActorBlueprint.msg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Copyright (c) 2024 Intel Corporation.
3+
#
4+
# This work is licensed under the terms of the MIT license.
5+
# For a copy, see <https://opensource.org/licenses/MIT>.
6+
#
7+
8+
string id
9+
string[] tags
10+
diagnostic_msgs/KeyValue[] attributes

msg/CarlaActorInfo.idl

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// generated from rosidl_adapter/resource/msg.idl.em
2+
// with input from carla_msgs/msg/CarlaActorInfo.msg
3+
// generated code does not contain a copyright notice
4+
#pragma once
5+
6+
7+
module carla_msgs {
8+
module msg {
9+
@verbatim (language="comment", text=
10+
"Copyright (c) 2019 Intel Corporation." "\n"
11+
"" "\n"
12+
"This work is licensed under the terms of the MIT license." "\n"
13+
"For a copy, see <https://opensource.org/licenses/MIT>.")
14+
struct CarlaActorInfo {
15+
uint32 id;
16+
17+
@verbatim (language="comment", text=
18+
"0 if no parent available")
19+
uint32 parent_id;
20+
21+
string type;
22+
23+
string rosname;
24+
25+
string rolename;
26+
27+
string object_type;
28+
29+
string base_type;
30+
31+
string topic_prefix;
32+
};
33+
};
34+
};

msg/CarlaActorInfo.msg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@
88
uint32 id
99
uint32 parent_id # 0 if no parent available
1010
string type
11+
string rosname
1112
string rolename
13+
string object_type
14+
string base_type
15+
string topic_prefix
16+
1217

msg/CarlaActorList.idl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// generated from rosidl_adapter/resource/msg.idl.em
2+
// with input from carla_msgs/msg/CarlaActorList.msg
3+
// generated code does not contain a copyright notice
4+
#pragma once
5+
6+
#include "carla_msgs/msg/CarlaActorInfo.idl"
7+
8+
module carla_msgs {
9+
module msg {
10+
@verbatim (language="comment", text=
11+
"Copyright (c) 2019 Intel Corporation." "\n"
12+
"" "\n"
13+
"This work is licensed under the terms of the MIT license." "\n"
14+
"For a copy, see <https://opensource.org/licenses/MIT>.")
15+
struct CarlaActorList {
16+
sequence<carla_msgs::msg::CarlaActorInfo> actors;
17+
};
18+
};
19+
};

msg/CarlaActorList.msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
# For a copy, see <https://opensource.org/licenses/MIT>.
66
#
77

8-
CarlaActorInfo[] actors
8+
carla_msgs/CarlaActorInfo[] actors
99

msg/CarlaBoundingBox.idl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// generated from rosidl_adapter/resource/msg.idl.em
2+
// with input from carla_msgs/msg/CarlaBoundingBox.msg
3+
// generated code does not contain a copyright notice
4+
#pragma once
5+
6+
#include "geometry_msgs/msg/Vector3.idl"
7+
8+
module carla_msgs {
9+
module msg {
10+
@verbatim (language="comment", text=
11+
"Copyright (c) 2020 Intel Corporation." "\n"
12+
"" "\n"
13+
"This work is licensed under the terms of the MIT license." "\n"
14+
"For a copy, see <https://opensource.org/licenses/MIT>.")
15+
struct CarlaBoundingBox {
16+
geometry_msgs::msg::Vector3 center;
17+
18+
geometry_msgs::msg::Vector3 size;
19+
};
20+
};
21+
};

msg/CarlaCollisionEvent.idl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// generated from rosidl_adapter/resource/msg.idl.em
2+
// with input from carla_msgs/msg/CarlaCollisionEvent.msg
3+
// generated code does not contain a copyright notice
4+
#pragma once
5+
6+
#include "geometry_msgs/msg/Vector3.idl"
7+
#include "std_msgs/msg/Header.idl"
8+
9+
module carla_msgs {
10+
module msg {
11+
@verbatim (language="comment", text=
12+
"Copyright (c) 2019 Intel Corporation." "\n"
13+
"" "\n"
14+
"This work is licensed under the terms of the MIT license." "\n"
15+
"For a copy, see <https://opensource.org/licenses/MIT>." "\n"
16+
"" "\n"
17+
"A collision event")
18+
struct CarlaCollisionEvent {
19+
std_msgs::msg::Header header;
20+
21+
uint32 other_actor_id;
22+
23+
geometry_msgs::msg::Vector3 normal_impulse;
24+
};
25+
};
26+
};

msg/CarlaControl.idl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// generated from rosidl_adapter/resource/msg.idl.em
2+
// with input from carla_msgs/msg/CarlaControl.msg
3+
// generated code does not contain a copyright notice
4+
#pragma once
5+
6+
7+
module carla_msgs {
8+
module msg {
9+
module CarlaControl_Constants {
10+
const int8 PLAY = 0;
11+
const int8 PAUSE = 1;
12+
const int8 STEP_ONCE = 2;
13+
};
14+
@verbatim (language="comment", text=
15+
"Copyright (c) 2019 Intel Corporation." "\n"
16+
"" "\n"
17+
"This work is licensed under the terms of the MIT license." "\n"
18+
"For a copy, see <https://opensource.org/licenses/MIT>.")
19+
struct CarlaControl {
20+
int8 command;
21+
};
22+
};
23+
};

0 commit comments

Comments
 (0)