Skip to content
This repository was archived by the owner on Feb 2, 2026. It is now read-only.

Commit a857402

Browse files
podgorkiJames
andauthored
Updating automation sensors and tf frame ground work (#30)
* updated the lidar arg names and added bng to get lidar pepped it * updated the lidar publisher to correctly poll the sensor and pack the pointCloud * added get sensor publisher to bridge so we can grab the automation sensors change sesnor into two types, classical and automation since they need to be handled differently and this seemed to be the least effort way to address this updated the sensors key in the west_coast_with_lidar.json example only - need to do the rest * created dyn_spec * fixed bug preventing lidar being published * aded tf frame to vehicle but somethings not right * updated the tf frame * added intensity channel * added publisher threading to get better ros hz * removed threading for now, for some reason I cant get all the topics to publsh when threading * moved the transformstamped for the vehicle state to the constructor * added a static transform for the lidar sensor. lidar points are in world coordinates though * added a static transform for the lidar sensor. lidar points are in world coordinates though * fed through the same time to all nodes for publishing. this means the transform lookups will work when driving around * addeda rviz window for the example.launch * added threads to the vehicle publisher for a modest 1 fps gain * updated the sesnsor field in all the scenarios to reflect the new sensors_classical and sensors_automation fields * added a tf listeer to the lidar poinntcloud so we can convert to ego centric lidar data * removed unused imports updated frame names in exception message * updated camera fields for the constructor * comminted the updates to sensor.json for the camera to work set is_visualised to off for in game lidar * updated sensor json * addd rviz * image sensors now have their correct data pulled - but instance dont work still * camera publisher now ony polls one per step this makes it faster if instance is required we must use full poll which isnt fast * change default cam position for all configs with cam * reupdated pos of cam - had my coordinate system wrong * updated the bbox publisher for when booxes work in future * added bboxes * Added environment variable for Simulator IP * added static tf frame broadcaster that is populated by the scenario config * update the marker timestams so the road pdates when visualizing the ego frame * update the marker timestams so the road pdates when visualizing the ego frame * added camera vector rotations for pitch and yaw (cant seem to get the rol to work setting up seems to break things) * set up to be (0,0,1) * added the rotation to the lidar change the neame from rotate camera to rotate direction vector * updated all the automation sensors in the configs * fixed a bug * yaw works * pitch works updated the rotation for the lidar and imu removed unneeded function * removed lidar rtation update since there is no update dir func * added a rotation to align the yawing of the vehicle with the road network. something is not quite correct tho becase the lidar is upsidown and proceesds in reverse? * updated rviz --------- Co-authored-by: Stefan Podgorski <stefan.podgorski@adelaide.edu.au> Co-authored-by: James <james@bockman.dev>
1 parent dde1f12 commit a857402

32 files changed

Lines changed: 888 additions & 304 deletions
Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
Panels:
2+
- Class: rviz/Displays
3+
Help Height: 78
4+
Name: Displays
5+
Property Tree Widget:
6+
Expanded:
7+
- /Global Options1
8+
- /Status1
9+
- /TF1
10+
- /TF1/Frames1
11+
- /TF1/Tree1
12+
- /MarkerArray1
13+
Splitter Ratio: 0.5
14+
Tree Height: 304
15+
- Class: rviz/Selection
16+
Name: Selection
17+
- Class: rviz/Tool Properties
18+
Expanded:
19+
- /2D Pose Estimate1
20+
- /2D Nav Goal1
21+
- /Publish Point1
22+
Name: Tool Properties
23+
Splitter Ratio: 0.5886790156364441
24+
- Class: rviz/Views
25+
Expanded:
26+
- /Current View1
27+
Name: Views
28+
Splitter Ratio: 0.5
29+
- Class: rviz/Time
30+
Name: Time
31+
SyncMode: 0
32+
SyncSource: PointCloud2
33+
Preferences:
34+
PromptSaveOnExit: true
35+
Toolbars:
36+
toolButtonStyle: 2
37+
Visualization Manager:
38+
Class: ""
39+
Displays:
40+
- Alpha: 0.5
41+
Cell Size: 1
42+
Class: rviz/Grid
43+
Color: 160; 160; 164
44+
Enabled: true
45+
Line Style:
46+
Line Width: 0.029999999329447746
47+
Value: Lines
48+
Name: Grid
49+
Normal Cell Count: 0
50+
Offset:
51+
X: 0
52+
Y: 0
53+
Z: 0
54+
Plane: XY
55+
Plane Cell Count: 10
56+
Reference Frame: <Fixed Frame>
57+
Value: true
58+
- Class: rviz/TF
59+
Enabled: true
60+
Filter (blacklist): ""
61+
Filter (whitelist): ""
62+
Frame Timeout: 15
63+
Frames:
64+
All Enabled: false
65+
ego_vehicle:
66+
Value: true
67+
ego_vehicle_front_cam_left:
68+
Value: true
69+
ego_vehicle_front_cam_right:
70+
Value: true
71+
ego_vehicle_lidar0:
72+
Value: true
73+
map:
74+
Value: true
75+
Marker Alpha: 1
76+
Marker Scale: 5
77+
Name: TF
78+
Show Arrows: true
79+
Show Axes: true
80+
Show Names: true
81+
Tree:
82+
map:
83+
ego_vehicle:
84+
ego_vehicle_front_cam_left:
85+
{}
86+
ego_vehicle_front_cam_right:
87+
{}
88+
ego_vehicle_lidar0:
89+
{}
90+
Update Interval: 0
91+
Value: true
92+
- Alpha: 1
93+
Autocompute Intensity Bounds: false
94+
Autocompute Value Bounds:
95+
Max Value: 10
96+
Min Value: -10
97+
Value: true
98+
Axis: Z
99+
Channel Name: intensity
100+
Class: rviz/PointCloud2
101+
Color: 255; 255; 255
102+
Color Transformer: Intensity
103+
Decay Time: 0
104+
Enabled: true
105+
Invert Rainbow: true
106+
Max Color: 255; 255; 255
107+
Max Intensity: 255
108+
Min Color: 0; 0; 0
109+
Min Intensity: 0
110+
Name: PointCloud2
111+
Position Transformer: XYZ
112+
Queue Size: 10
113+
Selectable: true
114+
Size (Pixels): 3
115+
Size (m): 0.05000000074505806
116+
Style: Flat Squares
117+
Topic: /beamng_control/ego_vehicle/lidar0
118+
Unreliable: false
119+
Use Fixed Frame: true
120+
Use rainbow: true
121+
Value: true
122+
- Class: rviz/MarkerArray
123+
Enabled: true
124+
Marker Topic: /beamng_control/road_network
125+
Name: MarkerArray
126+
Namespaces:
127+
beamng_control: true
128+
Queue Size: 1
129+
Value: true
130+
- Class: rviz/Image
131+
Enabled: true
132+
Image Topic: /beamng_control/ego_vehicle/front_cam_left/colour
133+
Max Value: 1
134+
Median window: 5
135+
Min Value: 0
136+
Name: colour_left
137+
Normalize Range: true
138+
Queue Size: 2
139+
Transport Hint: raw
140+
Unreliable: false
141+
Value: true
142+
- Class: rviz/Image
143+
Enabled: true
144+
Image Topic: /beamng_control/ego_vehicle/front_cam_right/colour
145+
Max Value: 1
146+
Median window: 5
147+
Min Value: 0
148+
Name: colour_right
149+
Normalize Range: true
150+
Queue Size: 2
151+
Transport Hint: raw
152+
Unreliable: false
153+
Value: true
154+
- Class: rviz/Image
155+
Enabled: false
156+
Image Topic: /beamng_control/ego_vehicle/front_cam_left/depth
157+
Max Value: 1
158+
Median window: 5
159+
Min Value: 0
160+
Name: depth_left
161+
Normalize Range: true
162+
Queue Size: 2
163+
Transport Hint: raw
164+
Unreliable: false
165+
Value: false
166+
- Class: rviz/Image
167+
Enabled: false
168+
Image Topic: /beamng_control/ego_vehicle/front_cam_left/annotation
169+
Max Value: 1
170+
Median window: 5
171+
Min Value: 0
172+
Name: annotation_left
173+
Normalize Range: true
174+
Queue Size: 2
175+
Transport Hint: raw
176+
Unreliable: false
177+
Value: false
178+
- Class: rviz/Image
179+
Enabled: false
180+
Image Topic: /beamng_control/ego_vehicle/front_cam_left/instance
181+
Max Value: 1
182+
Median window: 5
183+
Min Value: 0
184+
Name: instance_left
185+
Normalize Range: true
186+
Queue Size: 2
187+
Transport Hint: raw
188+
Unreliable: false
189+
Value: false
190+
- Class: rviz/Image
191+
Enabled: false
192+
Image Topic: /beamng_control/ego_vehicle/front_cam_left/bounding_box
193+
Max Value: 1
194+
Median window: 5
195+
Min Value: 0
196+
Name: bbox_left
197+
Normalize Range: true
198+
Queue Size: 2
199+
Transport Hint: raw
200+
Unreliable: false
201+
Value: false
202+
Enabled: true
203+
Global Options:
204+
Background Color: 48; 48; 48
205+
Default Light: true
206+
Fixed Frame: ego_vehicle
207+
Frame Rate: 30
208+
Name: root
209+
Tools:
210+
- Class: rviz/Interact
211+
Hide Inactive Objects: true
212+
- Class: rviz/MoveCamera
213+
- Class: rviz/Select
214+
- Class: rviz/FocusCamera
215+
- Class: rviz/Measure
216+
- Class: rviz/SetInitialPose
217+
Theta std deviation: 0.2617993950843811
218+
Topic: /initialpose
219+
X std deviation: 0.5
220+
Y std deviation: 0.5
221+
- Class: rviz/SetGoal
222+
Topic: /move_base_simple/goal
223+
- Class: rviz/PublishPoint
224+
Single click: true
225+
Topic: /clicked_point
226+
Value: true
227+
Views:
228+
Current:
229+
Class: rviz/Orbit
230+
Distance: 69.4802017211914
231+
Enable Stereo Rendering:
232+
Stereo Eye Separation: 0.05999999865889549
233+
Stereo Focal Distance: 1
234+
Swap Stereo Eyes: false
235+
Value: false
236+
Field of View: 0.7853981852531433
237+
Focal Point:
238+
X: 0
239+
Y: 0
240+
Z: 0
241+
Focal Shape Fixed Size: true
242+
Focal Shape Size: 0.05000000074505806
243+
Invert Z Axis: true
244+
Name: Current View
245+
Near Clip Distance: 0.009999999776482582
246+
Pitch: 0.6547950506210327
247+
Target Frame: <Fixed Frame>
248+
Yaw: 4.299472332000732
249+
Saved: ~
250+
Window Geometry:
251+
Displays:
252+
collapsed: false
253+
Height: 1016
254+
Hide Left Dock: false
255+
Hide Right Dock: false
256+
QMainWindow State: 000000ff00000000fd00000004000000000000018d000001d8fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afc000001bf000001d8000000e60100001cfa000000040100000005fb0000001400640065007000740068005f006c0065006600740100000000ffffffff0000007d00fffffffb0000001e0061006e006e006f0074006100740069006f006e005f006c0065006600740100000000ffffffff0000009f00fffffffb0000001200620062006f0078005f006c0065006600740100000000ffffffff0000007600fffffffb0000001a0069006e007300740061006e00630065005f006c0065006600740100000000ffffffff0000008d00fffffffb000000100044006900730070006c0061007900730100000000000001fd0000015600fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c0000026100000001000001a8000001d8fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a0056006900650077007301000001bf000001d8000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b2000000000000000000000002000007380000017cfc0100000003fb000000160063006f006c006f00750072005f006c0065006600740100000000000003e00000007f00fffffffb000000180063006f006c006f00750072005f0072006900670068007401000003e6000003520000008800fffffffb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007380000003efc0100000002fb0000000800540069006d0065010000000000000738000003bc00fffffffb0000000800540069006d00650100000000000004500000000000000000000003f7000001d800000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
257+
Selection:
258+
collapsed: false
259+
Time:
260+
collapsed: false
261+
Tool Properties:
262+
collapsed: false
263+
Views:
264+
collapsed: false
265+
Width: 1848
266+
X: 72
267+
Y: 27
268+
annotation_left:
269+
collapsed: false
270+
bbox_left:
271+
collapsed: false
272+
colour_left:
273+
collapsed: false
274+
colour_right:
275+
collapsed: false
276+
depth_left:
277+
collapsed: false
278+
instance_left:
279+
collapsed: false

beamng_control/config/scenarios/.json

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"model": "etk800",
1111
"position": [568.908, 13.422, 148.565],
1212
"rotation": [0, 0, 0, 1],
13-
"sensors": [
13+
"sensors_classical": [
1414
{
1515
"name":"damage0",
1616
"type":"Damage"
@@ -22,28 +22,11 @@
2222
{
2323
"name":"time0",
2424
"type":"Timer"
25-
},
26-
{
27-
"name": "front_cam",
28-
"type": "Camera.default",
29-
"position": [-0.3, 1, 1],
30-
"rotation": [0, 1, 0]
31-
},
32-
{
33-
"name":"parking_sensor",
34-
"type":"Ultrasonic.smallrange",
35-
"position":[0, 1, 2],
36-
"rotation":[0, 1, 0]
3725
},
3826
{
3927
"name": "electrics0",
4028
"type": "Electrics"
4129
},
42-
{
43-
"name": "lidar0",
44-
"type": "Lidar.default",
45-
"position": [0, 0, 1.7]
46-
},
4730
{
4831
"name": "node_imu",
4932
"type": "IMU",
@@ -54,6 +37,26 @@
5437
"type": "IMU",
5538
"position": [0.73, 0.51, 0.8]
5639
}
40+
],
41+
"sensors_automation": [
42+
{
43+
"name":"parking_sensor",
44+
"type":"Ultrasonic.smallrange",
45+
"position":[0, 1, 2],
46+
"rotation":[0, 0]
47+
},
48+
{
49+
"name": "front_cam",
50+
"type": "Camera.default",
51+
"position": [-0.3, 1, 1],
52+
"rotation": [0, 0]
53+
},
54+
{
55+
"name": "lidar0",
56+
"type": "Lidar.default",
57+
"position": [0, 0, 1.7],
58+
"rotation": [0, 0]
59+
}
5760
]
5861
}
5962
]

beamng_control/config/scenarios/GridMap.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"model": "etk800",
1111
"position": [568.908, 13.422, 148.565],
1212
"rotation": [0, 0, 0, 1],
13-
"sensors": [
13+
"sensors_automation": [
1414
{
1515
"name": "front_cam",
1616
"type": "Camera.default",
1717
"position": [-0.3, 1, 1],
18-
"rotation": [0, 1, 0]
18+
"rotation": [0, 0]
1919
}
2020
]
2121
}

0 commit comments

Comments
 (0)