Skip to content

Commit d5ef999

Browse files
author
GEM e4 user
committed
change model to hang_v1, fixed typo
1 parent 7743899 commit d5ef999

6 files changed

Lines changed: 3414 additions & 1 deletion

File tree

2025-02-18_11-01-55/PurePursuitTrajectoryTracker_debug.csv

Lines changed: 1391 additions & 0 deletions
Large diffs are not rendered by default.

2025-02-18_11-01-55/behavior.json

Lines changed: 1671 additions & 0 deletions
Large diffs are not rendered by default.

2025-02-18_11-01-55/meta.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
events:
2+
- description: Hardware fault override_active
3+
time: 1739898141.896652
4+
vehicle_time: 1739898141.8965485
5+
- description: Ctrl+C pressed, switching to recovery mode
6+
time: 1739898143.8960507
7+
vehicle_time: 1739898143.8812282
8+
- description: Mission execution ended
9+
time: 1739898143.916531
10+
vehicle_time: 1739898143.8812282
11+
exit_reason: normal exit
12+
git_branch: Control_teamB
13+
git_commit_id: 7743899fd6632599b8aa1c4c3c9a73270873950b
14+
pipelines:
15+
- name: drive
16+
time: 1739898116.0726633
17+
vehicle_time: 1739898115.9723945
18+
- name: recovery
19+
time: 1739898143.9031632
20+
vehicle_time: 1739898143.8812282
21+
start_time: 1739898115.96277
22+
start_time_human_readable: '2025-02-18 11:01:55'

2025-02-18_11-01-55/settings.yaml

Lines changed: 316 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,316 @@
1+
control:
2+
longitudinal_control:
3+
pid_d: 0.0
4+
pid_i: 0.1
5+
pid_p: 1.0
6+
pure_pursuit:
7+
crosstrack_gain: 0.5
8+
desired_speed: trajectory
9+
lookahead: 2.0
10+
lookahead_scale: 3.0
11+
recovery:
12+
brake_amount: 0.5
13+
brake_speed: 2.0
14+
model_predictive_controller:
15+
dt: 0.1
16+
lookahead: 20
17+
run:
18+
after:
19+
show_log_folder: true
20+
computation_graph:
21+
components:
22+
- state_estimation:
23+
inputs: []
24+
outputs:
25+
- vehicle
26+
- roadgraph_update:
27+
inputs:
28+
- vehicle
29+
outputs:
30+
- roadgraph
31+
- obstacle_detection:
32+
inputs:
33+
- vehicle
34+
outputs:
35+
- obstacles
36+
- agent_detection:
37+
inputs:
38+
- vehicle
39+
outputs:
40+
- agents
41+
- lane_detection:
42+
inputs:
43+
- vehicle
44+
- roadgraph
45+
outputs:
46+
- vehicle_lane
47+
- sign_detection:
48+
inputs:
49+
- vehicle
50+
- roadgraph
51+
outputs:
52+
- roadgraph.signs
53+
- environment_detection:
54+
inputs:
55+
- vehicle
56+
outputs:
57+
- environment
58+
- intent_estimation:
59+
inputs:
60+
- vehicle
61+
- roadgraph
62+
- agents
63+
outputs:
64+
- agent_intents
65+
- relations_estimation:
66+
inputs:
67+
- vehicle
68+
- roadgraph
69+
- agents
70+
- obstacles
71+
outputs:
72+
- relations
73+
- predicate_evaluation:
74+
inputs:
75+
- vehicle
76+
- roadgraph
77+
- agents
78+
- obstacles
79+
outputs:
80+
- predicates
81+
- perception_normalization:
82+
inputs:
83+
- all
84+
outputs: []
85+
- mission_execution:
86+
inputs: []
87+
outputs:
88+
- mission
89+
- route_planning:
90+
inputs:
91+
- vehicle
92+
- roadgraph
93+
- mission
94+
outputs:
95+
- route
96+
- driving_logic:
97+
inputs: []
98+
outputs:
99+
- intent
100+
- motion_planning:
101+
inputs:
102+
- all
103+
outputs:
104+
- trajectory
105+
- trajectory_tracking:
106+
inputs:
107+
- vehicle
108+
- trajectory
109+
outputs: []
110+
- signaling:
111+
inputs:
112+
- intent
113+
outputs: []
114+
description: Drive the GEM vehicle along a fixed route (currently xyhead_highbay_backlot_p.csv)
115+
drive:
116+
perception:
117+
perception_normalization: StandardPerceptionNormalizer
118+
state_estimation: GNSSStateEstimator
119+
planning:
120+
motion_planning:
121+
args:
122+
- null
123+
type: RouteToTrajectoryPlanner
124+
route_planning:
125+
args:
126+
- GEMstack/knowledge/routes/xyhead_highbay_backlot_p.csv
127+
type: StaticRoutePlanner
128+
trajectory_tracking:
129+
args:
130+
desired_speed: 2.5
131+
print: false
132+
type: pure_pursuit.PurePursuitTrajectoryTracker
133+
log:
134+
components:
135+
- state_estimation
136+
- trajectory_tracking
137+
ros_topics: []
138+
vehicle_interface: true
139+
mission_execution: StandardExecutor
140+
mode: hardware
141+
name: launch/fixed_route.yaml
142+
recovery:
143+
planning:
144+
trajectory_tracking:
145+
print: false
146+
type: recovery.StopTrajectoryTracker
147+
replay:
148+
components: []
149+
log: null
150+
ros_topics: []
151+
require_engaged: false
152+
variants:
153+
log_ros:
154+
log:
155+
ros_topics:
156+
- /game_control/joy
157+
- /front_radar/front_radar/objects
158+
- /front_radar/front_radar/radar_tracks
159+
- /lidar1/velodyne_points
160+
- /novatel/inspva
161+
- /novatel/imu
162+
- /novatel/bestpos
163+
- /zed2/zed_node/depth/camera_info
164+
- /zed2/zed_node/depth/depth_registered
165+
- /zed2/zed_node/rgb/camera_info
166+
- /zed2/zed_node/rgb/image_rect_color
167+
- /zed2/zed_node/imu/data
168+
- /zed2/zed_node/imu/data_raw
169+
- /zed2/zed_node/imu/mag
170+
- /pacmod/as_rx/enable
171+
- /pacmod/as_rx/accel_cmd
172+
- /pacmod/as_rx/brake_cmd
173+
- /pacmod/as_rx/shift_cmd
174+
- /pacmod/as_rx/steer_cmd
175+
- /pacmod/as_rx/turn_cmd
176+
- /pacmod/as_rx/turn_signal_cmd
177+
- /pacmod/as_rx/vehicle_speed_cmd
178+
- /pacmod/as_tx/enable
179+
- /pacmod/as_tx/global_rpt
180+
- /pacmod/as_tx/accel_rpt
181+
- /pacmod/as_tx/brake_rpt
182+
- /pacmod/as_tx/shift_rpt
183+
- /pacmod/as_tx/steer_rpt
184+
- /pacmod/as_tx/turn_rpt
185+
- /pacmod/as_tx/vehicle_speed_rpt
186+
sim:
187+
run:
188+
drive:
189+
perception:
190+
agent_detection: OmniscientAgentDetector
191+
state_estimation: OmniscientStateEstimator
192+
mode: simulation
193+
vehicle_interface:
194+
args:
195+
scene: scenes/xyhead_demo.yaml
196+
type: gem_simulator.GEMDoubleIntegratorSimulationInterface
197+
visualization:
198+
args:
199+
rate: 20
200+
save_as: null
201+
type: klampt_visualization.KlamptVisualization
202+
vehicle_interface: gem_hardware.GEMHardwareInterface
203+
simulator:
204+
dt: 0.01
205+
gnss_emulator:
206+
dt: 0.1
207+
real_time_multiplier: 1.0
208+
vehicle:
209+
calibration:
210+
calibration_date: '2024-03-05'
211+
front_camera:
212+
center_position:
213+
- 1.78
214+
- 0
215+
- 1.58
216+
reference: rear_axle_center
217+
rotation:
218+
- - 0
219+
- 0
220+
- 1
221+
- - -1
222+
- 0
223+
- 0
224+
- - 0
225+
- -1
226+
- 0
227+
gnss_location:
228+
- 1.1
229+
- 0
230+
- 1.62
231+
gnss_yaw: 0.0
232+
rear_axle_height: 0.33
233+
reference: rear_axle_center
234+
top_lidar:
235+
position:
236+
- 1.1
237+
- 0
238+
- 2.03
239+
reference: rear_axle_center
240+
rotation:
241+
- - 1
242+
- 0
243+
- 0
244+
- - 0
245+
- 1
246+
- 0
247+
- - 0
248+
- 0
249+
- 1
250+
control_defaults:
251+
accelerator_pedal_speed: 3.0
252+
brake_pedal_speed: 3.0
253+
steering_wheel_speed: 4.0
254+
dynamics:
255+
acceleration_deadband: 0.1
256+
acceleration_model: kris_v1
257+
accelerator_active_range:
258+
- 0.2
259+
- 1.0
260+
aerodynamic_drag_coefficient: 0.01
261+
brake_active_range:
262+
- 0
263+
- 1
264+
gravity: 9.81
265+
internal_dry_deceleration: 0.2
266+
internal_viscous_deceleration: 0.05
267+
lateral_friction: 1.0
268+
longitudinal_friction: 1.0
269+
mass: 300.0
270+
max_accelerator_acceleration:
271+
- 0.0
272+
- 5.0
273+
max_accelerator_acceleration_reverse: 2.5
274+
max_accelerator_power:
275+
- 0.0
276+
- 10000.0
277+
max_accelerator_power_reverse: 10000.0
278+
max_brake_deceleration: 8.0
279+
enable_through_joystick: true
280+
geometry:
281+
bounds:
282+
- - -0.35
283+
- 2.85
284+
- - -0.85
285+
- 0.85
286+
- - 0
287+
- 2.5
288+
height: 2.5
289+
length: 3.2
290+
max_steering_angle: 11.0
291+
max_wheel_angle: 0.6108
292+
min_steering_angle: -11.0
293+
min_wheel_angle: -0.6108
294+
urdf_model: /home/gem/control_team_b/GEMstack/knowledge/vehicle/model/gem_e4.urdf
295+
wheel_radius: 0.33
296+
wheelbase: 2.56
297+
width: 1.7
298+
limits:
299+
max_acceleration: 1.0
300+
max_accelerator_pedal: 0.5
301+
max_brake_pedal: 0.5
302+
max_deceleration: 2.0
303+
max_reverse_speed: 0.25
304+
max_speed: 2.5
305+
max_steering_rate: 2.0
306+
max_command_rate: 10.0
307+
max_gear: 1
308+
name: GEM
309+
num_wiper_settings: 1
310+
sensors:
311+
ros_topics:
312+
front_camera: /oak/rgb/image_raw
313+
front_depth: /oak/stereo/image_raw
314+
gnss: /septentrio_gnss/insnavgeod
315+
top_lidar: /ouster/points
316+
version: e4
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
calibration_date: "2024-03-05" # Date of calibration YYYY-MM-DD
22
reference: rear_axle_center # rear axle center
33
rear_axle_height: 0.33 # height of rear axle center above flat ground
4-
gnss_location: [1.10,1.62] # meters, taken from https://github.com/hangcui1201/POLARIS_GEM_e2_Real/blob/main/vehicle_drivers/gem_gnss_control/scripts/gem_gnss_tracker_stanley_rtk.py. Note conflict with pure pursuit location?
4+
gnss_location: [1.10,0,1.62] # meters, taken from https://github.com/hangcui1201/POLARIS_GEM_e2_Real/blob/main/vehicle_drivers/gem_gnss_control/scripts/gem_gnss_tracker_stanley_rtk.py. Note conflict with pure pursuit location?
55
gnss_yaw: 0.0 # radians
66
top_lidar: !include "gem_e4_ouster.yaml"
77
front_camera: !include "gem_e4_oak.yaml"

GEMstack/knowledge/vehicle/dynamics.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ def acceleration_to_pedal_positions(acceleration : float, velocity : float, pitc
1818
Returns tuple (accelerator_pedal_position, brake_pedal_position, desired_gear)
1919
"""
2020
model = settings.get('vehicle.dynamics.acceleration_model','hang_v1')
21+
22+
model = 'hang_v1'
23+
# print("===============")
24+
# print(model)
25+
# print("===============")
26+
2127
if model == 'hang_v1':
2228
if gear != 1:
2329
print("WARNING can't handle gears other than 1 yet")
@@ -36,6 +42,13 @@ def acceleration_to_pedal_positions(acceleration : float, velocity : float, pitc
3642
else:
3743
brake_percent = brake_active_range[0] + -(acceleration+dry_decel)/max_brake * (brake_active_range[1]-brake_active_range[0])
3844
throttle_percent = 0
45+
46+
print("accel : {:.3f}".format(acceleration))
47+
print("vel : {:.3f}".format(velocity))
48+
print("gear : {}".format(gear))
49+
print("gas : {:.2f}".format(throttle_percent))
50+
print("brake : {:.2f}".format(brake_percent))
51+
3952
return (max(throttle_percent,0.0),max(brake_percent,0.0),1)
4053

4154
elif model == 'kris_v1':

0 commit comments

Comments
 (0)