Skip to content

Commit f705f9b

Browse files
committed
wip
1 parent 4f3a222 commit f705f9b

8 files changed

Lines changed: 847 additions & 142 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,10 @@ install(TARGETS
199199
websocket
200200
DESTINATION lib/${PROJECT_NAME})
201201

202-
# Copy simulator configs
203-
install(DIRECTORY
204-
config
205-
DESTINATION share/${PROJECT_NAME}
206-
OPTIONAL)
207-
208202
# ROS 2 package finalization
209203
# Install launch files, config files, scripts, etc.
210204
install(DIRECTORY
211205
launch
212-
config
213206
DESTINATION share/${PROJECT_NAME}
214207
OPTIONAL)
215208

@@ -222,25 +215,5 @@ install(DIRECTORY
222215

223216
ament_export_dependencies(rosidl_default_runtime)
224217

225-
# Generate car.lua from the hostname at build time and install it.
226-
# The generated file will be written to the build tree and then installed
227-
# into share/${PROJECT_NAME}/config/car.lua so it ends up at
228-
# $(ros2 pkg prefix ut_automata)/share/ut_automata/config/car.lua
229-
set(GENERATED_CAR_LUA ${CMAKE_CURRENT_BINARY_DIR}/share/${PROJECT_NAME}/config/car.lua)
230-
231-
add_custom_command(
232-
OUTPUT ${GENERATED_CAR_LUA}
233-
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/share/${PROJECT_NAME}/config
234-
COMMAND /bin/sh -c "hn=$(hostname); num=$(echo \"${hn}\" | grep -oE '[0-9]+' | tail -n1); if [ -z \"${num}\" ]; then num=0; fi; printf 'car_name = \"car%s\";\\n' \"${num}\" > \"${GENERATED_CAR_LUA}\""
235-
COMMENT "Generating ${GENERATED_CAR_LUA} from hostname"
236-
VERBATIM
237-
)
238-
239-
add_custom_target(generate_car_lua ALL DEPENDS ${GENERATED_CAR_LUA})
240-
241-
# Install the generated file into the package share directory so it's available
242-
# after 'colcon build' under $(ros2 pkg prefix ut_automata)/share/ut_automata/config/car.lua
243-
install(FILES ${GENERATED_CAR_LUA} DESTINATION share/${PROJECT_NAME}/config)
244-
245218
# ament_package() MUST be the last line
246219
ament_package()

config/vesc.lua

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ joystick_turbo_speed = 2.0; -- m/s
2626

2727
-- Maximum steering angle in radians for joystick control
2828
-- Formula: max_steering_angle = atan(wheelbase / desired_min_turning_radius)
29-
-- Example: 0.286 rad (16.4°) gives 1.1m turning radius with 0.324m wheelbase
30-
max_steering_angle = 0.286; -- radians
29+
-- Example: 0.425 rad (24.35°) gives 0.75m turning radius with 0.324m wheelbase
30+
max_steering_angle = 0.425; -- radians
3131

3232
-- IMU fusion parameters
3333
fuse_imu = true; -- Set to true to fuse IMU data with odometry using EKF
@@ -36,3 +36,13 @@ calibrate_imu = true; -- Calibrate IMU on startup
3636
imu_gyro_range = 0; -- 0=250, 1=500, 2=1000, 3=2000 deg/s
3737
imu_accel_range = 0; -- 0=2g, 1=4g, 2=8g, 3=16g
3838
imu_dlpf_bandwidth = 0; -- 0=260Hz, 1=184Hz, 2=94Hz, 3=44Hz, 4=21Hz, 5=10Hz, 6=5Hz
39+
40+
-- Debug EKF logging for drift analysis
41+
debug_ekf = true; -- Set to true to log EKF data
42+
debug_log_path = "/home/orin/roboracer_ws/data/debug/ekf_debug.csv"; -- Path to debug log file
43+
44+
-- IMU mounting orientation is configured in vesc_driver.cpp
45+
-- Common orientations:
46+
-- Standard (IMU +x forward, +y left): {1, 0, 1, 1, 1, 2}
47+
-- IMU +x rear, +y right: {-1, 0, -1, 1, -1, 0}
48+
-- IMU +x right, +y forward: {1, 1, -1, 0, 1, 2}

0 commit comments

Comments
 (0)