Skip to content

Commit 71e6ffa

Browse files
author
Fabian Oboril
authored
Merge pull request #91 from carla-simulator/feature/further_cleanup
Feature/further cleanup
2 parents b88815a + 814af5c commit 71e6ffa

34 files changed

+185
-96
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Latest changed
22

3+
* rename gnss topic from '../gnss' to '../fix'
34
* Add lane invasion sensor
45
* Add collision sensor
56
* Rename CarlaVehicleControl to CarlaEgoVehicleControl (and add some more message types)

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This documentation is for CARLA versions *newer* than 0.9.4.
3838

3939
#install required ros-dependencies
4040
rosdep update
41-
rosdep install --from-path .
41+
rosdep install --from-paths src --ignore-src -r
4242

4343
#build
4444
catkin_make
@@ -124,21 +124,21 @@ Currently the following sensors are supported:
124124

125125
|Topic | Type |
126126
|-------------------------------|------|
127-
| `/carla/<ROLE NAME>/collision` | [carla_ros_bridge.CarlaCollisionEvent](carla_ros_bridge/msg/CarlaCollisionEvent.msg) |
127+
| `/carla/<ROLE NAME>/collision` | [carla_ros_bridge_msgs.CarlaCollisionEvent](carla_ros_bridge_msgs/msg/CarlaCollisionEvent.msg) |
128128

129129
#### Lane Invasion Sensor
130130

131131
|Topic | Type |
132132
|-------------------------------|------|
133-
| `/carla/<ROLE NAME>/lane_invasion` | [carla_ros_bridge.CarlaLaneInvasionEvent](carla_ros_bridge/msg/CarlaLaneInvasionEvent.msg) |
133+
| `/carla/<ROLE NAME>/lane_invasion` | [carla_ros_bridge_msgs.CarlaLaneInvasionEvent](carla_ros_bridge_msgs/msg/CarlaLaneInvasionEvent.msg) |
134134

135135
### Control
136136

137137
|Topic | Type |
138138
|--------------------------------------|------|
139-
| `/carla/<ROLE NAME>/vehicle_control_cmd` (subscriber) | [carla_ros_bridge.CarlaEgoVehicleControl](carla_ros_bridge/msg/CarlaEgoVehicleControl.msg) |
140-
| `/carla/<ROLE NAME>/vehicle_status` | [carla_ros_bridge.CarlaEgoVehicleStatus](carla_ros_bridge/msg/CarlaEgoVehicleStatus.msg) |
141-
| `/carla/<ROLE NAME>/vehicle_info` | [carla_ros_bridge.CarlaEgoVehicleInfo](carla_ros_bridge/msg/CarlaEgoVehicleInfo.msg) |
139+
| `/carla/<ROLE NAME>/vehicle_control_cmd` (subscriber) | [carla_ros_bridge_msgs.CarlaEgoVehicleControl](carla_ros_bridge_msgs/msg/CarlaEgoVehicleControl.msg) |
140+
| `/carla/<ROLE NAME>/vehicle_status` | [carla_ros_bridge_msgs.CarlaEgoVehicleStatus](carla_ros_bridge_msgs/msg/CarlaEgoVehicleStatus.msg) |
141+
| `/carla/<ROLE NAME>/vehicle_info` | [carla_ros_bridge_msgs.CarlaEgoVehicleInfo](carla_ros_bridge_msgs/msg/CarlaEgoVehicleInfo.msg) |
142142

143143
You can stear the ego vehicle from the commandline by publishing to the topic `/carla/<ROLE NAME>/vehicle_control_cmd`.
144144

carla_ackermann_control/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ find_package(catkin REQUIRED COMPONENTS
66
message_generation
77
rospy
88
std_msgs
9-
geometry_msgs
109
ackermann_msgs
1110
dynamic_reconfigure
12-
carla_ros_bridge
11+
carla_ros_bridge_msgs
1312
)
1413

1514
catkin_python_setup()
@@ -26,8 +25,7 @@ add_message_files(
2625
generate_messages(
2726
DEPENDENCIES
2827
std_msgs
29-
geometry_msgs
30-
carla_ros_bridge
28+
carla_ros_bridge_msgs
3129
)
3230

3331
generate_dynamic_reconfigure_options(

carla_ackermann_control/msg/EgoVehicleControlInfo.msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ EgoVehicleControlCurrent current
2121
EgoVehicleControlStatus status
2222

2323
# the current control output to CARLA
24-
carla_ros_bridge/CarlaEgoVehicleControl output
24+
carla_ros_bridge_msgs/CarlaEgoVehicleControl output

carla_ackermann_control/package.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
<license>MIT</license>
88
<buildtool_depend>catkin</buildtool_depend>
99
<build_depend>rospy</build_depend>
10+
<build_depend>carla_ros_bridge_msgs</build_depend>
1011
<build_export_depend>rospy</build_export_depend>
1112
<exec_depend>rospy</exec_depend>
1213
<exec_depend>ackermann_msgs</exec_depend>
1314
<exec_depend>carla_ros_bridge</exec_depend>
1415
<exec_depend>std_msgs</exec_depend>
15-
<exec_depend>geometry_msgs</exec_depend>
1616
<exec_depend>dynamic_reconfigure</exec_depend>
17+
<exec_depend>carla_ros_bridge_msgs</exec_depend>
1718
<export>
1819
</export>
1920
</package>

carla_ackermann_control/src/carla_ackermann_control/carla_ackermann_control_node.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
from dynamic_reconfigure.server import Server
2020
from ackermann_msgs.msg import AckermannDrive
21-
from carla_ros_bridge.msg import CarlaEgoVehicleStatus # pylint: disable=no-name-in-module,import-error
22-
from carla_ros_bridge.msg import CarlaEgoVehicleControl # pylint: disable=no-name-in-module,import-error
23-
from carla_ros_bridge.msg import CarlaEgoVehicleInfo # pylint: disable=no-name-in-module,import-error
21+
from carla_ros_bridge_msgs.msg import CarlaEgoVehicleStatus # pylint: disable=no-name-in-module,import-error
22+
from carla_ros_bridge_msgs.msg import CarlaEgoVehicleControl # pylint: disable=no-name-in-module,import-error
23+
from carla_ros_bridge_msgs.msg import CarlaEgoVehicleInfo # pylint: disable=no-name-in-module,import-error
2424
from carla_ackermann_control.msg import EgoVehicleControlInfo # pylint: disable=no-name-in-module,import-error
2525
from carla_ackermann_control.cfg import EgoVehicleControlParameterConfig # pylint: disable=no-name-in-module,import-error
2626
import carla_control_physics as phys # pylint: disable=relative-import

carla_ego_vehicle/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ catkin_package(
1515
catkin_install_python(PROGRAMS
1616
src/carla_ego_vehicle/carla_example_ego_vehicle.py
1717
src/carla_ego_vehicle/carla_ego_vehicle_base.py
18-
src/carla_ego_vehicle/carla_ros_manual_control.py
1918
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
2019
)
2120

carla_ego_vehicle/README.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# ROS Ego Vehicle
22

3-
This package provides two ROS nodes:
4-
5-
- Carla Example Ego Vehicle: A reference client for spawning an ego vehicle
6-
- Carla ROS Manual Control: a ROS-only manual control
7-
8-
9-
## Carla Example Ego Vehicle
10-
113
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.
124

135
- GNSS
@@ -16,7 +8,7 @@ The reference Carla client `carla_example_ego_vehicle` can be used to spawn an e
168
- Collision Sensor
179
- Lane Invasion Sensor
1810

19-
Info: To be able to use carla_ros_manual_control a camera with role-name 'view' is required.
11+
Info: To be able to use `carla_manual_control` a camera with role-name 'view' and resolution of 800x600 is required.
2012

2113
If no specific position is set, the ego vehicle is spawned at a random position.
2214

@@ -47,21 +39,3 @@ The format is a list of dictionaries. One dictionary has the values as follows:
4739
<ADDITIONAL-SENSOR-ATTRIBUTES>
4840
}
4941

50-
## Carla ROS Manual Control
51-
52-
The node `carla_ros_manual_control` is a ROS-only version of the Carla `manual_control.py`. All data is received
53-
via ROS topics.
54-
55-
Note: To be able to use carla_ros_manual_control a camera with role-name 'view' needs to be spawned by `carla_ego_vehicle`.
56-
57-
58-
### Manual steering
59-
60-
In order to steer manually, you might need to disable sending vehicle control commands within another ROS node.
61-
62-
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)).
63-
64-
Press `B` to toggle the value.
65-
66-
Note: As sending the vehicle control commands is highly dependent on your setup, you need to implement the subscriber to that topic yourself.
67-

carla_ego_vehicle/launch/carla_ros_manual_control.launch

Lines changed: 0 additions & 7 deletions
This file was deleted.

carla_ego_vehicle/src/carla_ego_vehicle/carla_ego_vehicle_base.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ def setup_sensors(self, sensors):
151151
roll=sensor_spec['roll'],
152152
yaw=sensor_spec['yaw'])
153153
elif sensor_spec['type'].startswith('sensor.lidar'):
154-
bp.set_attribute('range', '200')
155-
bp.set_attribute('rotation_frequency', '10')
156-
bp.set_attribute('channels', '32')
157-
bp.set_attribute('upper_fov', '15')
158-
bp.set_attribute('lower_fov', '-30')
159-
bp.set_attribute('points_per_second', '500000')
154+
bp.set_attribute('range', str(sensor_spec['range']))
155+
bp.set_attribute('rotation_frequency', str(sensor_spec['rotation_frequency']))
156+
bp.set_attribute('channels', str(sensor_spec['channels']))
157+
bp.set_attribute('upper_fov', str(sensor_spec['upper_fov']))
158+
bp.set_attribute('lower_fov', str(sensor_spec['lower_fov']))
159+
bp.set_attribute('points_per_second', str(sensor_spec['points_per_second']))
160160
sensor_location = carla.Location(x=sensor_spec['x'], y=sensor_spec['y'],
161161
z=sensor_spec['z'])
162162
sensor_rotation = carla.Rotation(pitch=sensor_spec['pitch'],

0 commit comments

Comments
 (0)