Skip to content

Commit 2ec9a23

Browse files
author
Bernd Gassmann
committed
Added CarlaEpisodeSettings.msg SetEpisodeSettings.srv
and use that one in CarlaStatus.idl for reporting
1 parent 1a5bddd commit 2ec9a23

7 files changed

Lines changed: 101 additions & 14 deletions

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ set(SERVICE_FILES
1414
GetAvailableMaps.srv
1515
GetBlueprints.srv
1616
LoadMap.srv
17+
SetEpisodeSettings.srv
1718
SpawnObject.srv
1819
)
1920

@@ -24,6 +25,7 @@ set(MSG_FILES
2425
CarlaBoundingBox.msg
2526
CarlaCollisionEvent.msg
2627
CarlaControl.msg
28+
CarlaEpisodeSettings.msg
2729
CarlaVehicleControl.msg
2830
CarlaVehicleInfo.msg
2931
CarlaVehicleInfoWheel.msg

msg/CarlaEpisodeSettings.idl

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// generated from rosidl_adapter/resource/msg.idl.em
2+
// with input from carla_msgs/msg/CarlaEpisodeSettings.msg
3+
// generated code does not contain a copyright notice
4+
#pragma once
5+
6+
module carla_msgs {
7+
module msg {
8+
@verbatim (language="comment", text=
9+
"Copyright (c) 2024 Intel Corporation." "\n"
10+
"" "\n"
11+
"This work is licensed under the terms of the MIT license." "\n"
12+
"For a copy, see <https://opensource.org/licenses/MIT>.")
13+
struct CarlaEpisodeSettings {
14+
@default (value=FALSE)
15+
boolean synchronous_mode;
16+
17+
@default (value=FALSE)
18+
boolean no_rendering_mode;
19+
20+
float fixed_delta_seconds;
21+
22+
@default (value=TRUE)
23+
boolean substepping;
24+
25+
@default (value=0.01)
26+
float max_substep_delta_time;
27+
28+
@default (value=10)
29+
int32 max_substeps;
30+
31+
@default (value=0.0)
32+
float max_culling_distance;
33+
34+
@default (value=FALSE)
35+
boolean deterministic_ragdolls;
36+
37+
@default (value=3000.0)
38+
float tile_stream_distance;
39+
40+
@default (value=2000.0)
41+
float actor_active_distance;
42+
43+
@default (value=TRUE)
44+
boolean spectator_as_ego;
45+
};
46+
};
47+
};

msg/CarlaEpisodeSettings.msg

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
bool synchronous_mode false
9+
bool no_rendering_mode false
10+
float32 fixed_delta_seconds
11+
bool substepping true
12+
float32 max_substep_delta_time 0.01
13+
int32 max_substeps 10
14+
float32 max_culling_distance 0.0
15+
bool deterministic_ragdolls false
16+
float32 tile_stream_distance 3000.0
17+
float32 actor_active_distance 2000.0
18+
bool spectator_as_ego true

msg/CarlaStatus.idl

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// generated code does not contain a copyright notice
44
#pragma once
55

6+
#include "carla_msgs/msg/CarlaEpisodeSettings.idl"
67
#include "std_msgs/msg/Header.idl"
78

89
module carla_msgs {
@@ -19,17 +20,7 @@ module carla_msgs {
1920
"frame number")
2021
uint64 frame;
2122

22-
@verbatim (language="comment", text=
23-
"duration of one frame")
24-
float fixed_delta_seconds;
25-
26-
@verbatim (language="comment", text=
27-
"carla is in synchronous mode")
28-
boolean synchronous_mode;
29-
30-
@verbatim (language="comment", text=
31-
"true: running, false: paused")
32-
boolean synchronous_mode_running;
23+
carla_msgs::msg::CarlaEpisodeSettings episode_settings;
3324
};
3425
};
3526
};

msg/CarlaStatus.msg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@
88
std_msgs/Header header
99

1010
uint64 frame # frame number
11+
carla_msgs/CarlaEpisodeSettings episode_settings
1112

12-
float32 fixed_delta_seconds # duration of one frame
13-
bool synchronous_mode # carla is in synchronous mode
14-
bool synchronous_mode_running # true: running, false: paused

srv/SetEpisodeSettings.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/srv.idl.em
2+
// with input from carla_msgs/srv/SetEpisodeSettings.srv
3+
// generated code does not contain a copyright notice
4+
5+
#include "carla_msgs/msg/CarlaEpisodeSettings.idl"
6+
7+
module carla_msgs {
8+
module srv {
9+
@verbatim (language="comment", text=
10+
"Copyright (c) 2020 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 SetEpisodeSettings_Request {
15+
carla_msgs::msg::CarlaEpisodeSettings episode_settings;
16+
};
17+
struct SetEpisodeSettings_Response {
18+
boolean success;
19+
};
20+
};
21+
};

srv/SetEpisodeSettings.srv

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Copyright (c) 2020 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+
carla_msgs/CarlaEpisodeSettings episode_settings
9+
---
10+
bool success

0 commit comments

Comments
 (0)