Skip to content

Commit

Permalink
Load different firmware parameters depending on launch argument
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsowa committed Nov 7, 2023
1 parent 446ceac commit d8edb43
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
18 changes: 18 additions & 0 deletions leo_bringup/config/firmware_diff_drive_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
wheels:
encoder_resolution: 878.4
torque_constant: 1.17647
pid:
p: 0.0
i: 0.005
d: 0.0
pwm_duty_limit: 100.0

mecanum_wheels: false

controller:
wheel_radius: 0.0625
wheel_separation: 0.358
angular_velocity_multiplier: 1.76
input_timeout: 500

battery_min_voltage: 10.0
19 changes: 19 additions & 0 deletions leo_bringup/config/firmware_mecanum_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
wheels:
encoder_resolution: 878.4
torque_constant: 1.17647
pid:
p: 0.0
i: 0.005
d: 0.0
pwm_duty_limit: 100.0

mecanum_wheels: true

controller:
wheel_radius: 0.0635
wheel_separation: 0.37
wheel_base: 0.3052
angular_velocity_multiplier: 1.0
input_timeout: 500

battery_min_voltage: 10.0
8 changes: 7 additions & 1 deletion leo_bringup/launch/leo_bringup.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@
<param from="$(find-pkg-share leo_bringup)/config/firmware_message_converter.yaml" />
</node>

<let if="$(var mecanum_wheels)" name="firmware_default_params_file"
value="$(find-pkg-share leo_bringup)/config/firmware_mecanum_params.yaml" />
<let unless="$(var mecanum_wheels)" name="firmware_default_params_file"
value="$(find-pkg-share leo_bringup)/config/firmware_diff_drive_params.yaml" />

<node pkg="leo_fw" exec="firmware_parameter_bridge">
<param name="override_params_file_path" value="$(var firmware_params_file)" />
<param name="default_params_file_path" value="$(var firmware_default_params_file)" />
<param name="override_params_file_path" value="$(var firmware_override_params_file)" />
</node>

<node_container namespace=""
Expand Down

0 comments on commit d8edb43

Please sign in to comment.