Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/RPM + sensor thresholds + fancy sensors #149

Merged
merged 42 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
16a0750
Add RPM status output
Apehaenger Aug 21, 2024
eec186f
Directional RPM (uint to int change)
Apehaenger Aug 24, 2024
cf9c5c2
Submodule commit hash. Required?
Apehaenger Aug 24, 2024
09d8d94
Add motor_pole_pairs parameter
Apehaenger Aug 24, 2024
ec5fefb
Add RPM monitoring sensor/data
Apehaenger Sep 2, 2024
20afc9b
Commit xbot_monitoring & xbot_msg changes
Apehaenger Sep 2, 2024
863d080
Slightly restructure sensors and add threshold readings from ESC params
Apehaenger Sep 4, 2024
2a3e391
Add default ESC thresholds/limits
Apehaenger Sep 4, 2024
a04fc4f
Add threshold/limits from open_mower config and OpenMower FW
Apehaenger Sep 4, 2024
b526466
Add V-Charge limits
Apehaenger Sep 6, 2024
c7c7135
Add Charge-Current max default
Apehaenger Sep 6, 2024
41e0f15
Adapt to reasonable battery defaults and min/max values
Apehaenger Sep 7, 2024
31dcc0b
Add threshold parameter
Apehaenger Sep 8, 2024
10ed750
Fail with dynamic_reconfigure::Client implementation
Apehaenger Sep 8, 2024
7bd1cf3
Finish implementing dynamic reconfigure client
Apehaenger Sep 9, 2024
90ef6bb
Fix race condition risk (rovo89)
Apehaenger Sep 10, 2024
62e4cf0
Merged redundant sensor definitions
Apehaenger Sep 10, 2024
ac91500
Apply code improvement hints (rovo89)
Apehaenger Sep 11, 2024
29fba08
Imporve readability of sensor config map
Apehaenger Sep 11, 2024
2550d6d
Tiny code formatting changes
Apehaenger Sep 12, 2024
06361b7
xbot_monitoring dependency
Apehaenger Sep 12, 2024
c398f39
Fix sim launch file
Apehaenger Sep 12, 2024
5cbe7a6
Skip sensor (info & data) if has_motor_temp==false
Apehaenger Sep 17, 2024
a6b137c
WebApp with fancy sensors
Apehaenger Sep 17, 2024
26828b6
Fix sensor axis calc if there's no max- nor upperCritical- Value
Apehaenger Sep 17, 2024
4733562
Change to /mower_comms parameter handle
Apehaenger Sep 18, 2024
203d4d7
Replace set_sensor_limits against sensor_config callbacks (rovo89)
Apehaenger Sep 18, 2024
b873aa3
Hints by rovo89
Apehaenger Sep 19, 2024
2d227db
De-colorize axis gradients
Apehaenger Sep 19, 2024
d44d3f4
Fix negative RPM pointer (value still shows negative value as rotatio…
Apehaenger Sep 19, 2024
8679a74
Adapt default RPM thresholds
Apehaenger Sep 22, 2024
ecd4bae
Merge branch 'feature/RPM' of github.com:Apehaenger/open_mower_ros in…
Apehaenger Sep 22, 2024
011d236
OpenMowerApp #591dc3a
Apehaenger Sep 22, 2024
4fc3172
Fix "No newline at end of file"
Apehaenger Sep 22, 2024
3d363e7
Merge remote-tracking branch 'upstream/main' into feature/RPM
Apehaenger Sep 23, 2024
fad50f9
OpenMowerApp #26e2321
Apehaenger Sep 23, 2024
28877e6
OpenMowerApp #c1ff553
Apehaenger Sep 24, 2024
c9bda9f
OpenMowerApp #309ed8f
Apehaenger Sep 26, 2024
cdaf9b3
Adapt RPM thresholds
Apehaenger Oct 1, 2024
0dda8ec
Revert "Adapt RPM thresholds"
Apehaenger Oct 1, 2024
360f7ea
Allow lower battery_* thresholds for i.e. 6S packs
Apehaenger Oct 1, 2024
626dbb3
Changed battery max values back to 32.0V
Apehaenger Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/xbot_monitoring
2 changes: 1 addition & 1 deletion src/lib/xbot_msgs
1 change: 1 addition & 0 deletions src/mower_comms/src/mower_comms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ void convertStatus(xesc_msgs::XescStateStamped &vesc_status, mower_msgs::ESCStat
ros_esc_status.status = mower_msgs::ESCStatus::ESC_STATUS_OK;
}
ros_esc_status.tacho = vesc_status.state.tacho;
ros_esc_status.rpm = vesc_status.state.rpm;
ros_esc_status.current = vesc_status.state.current_input;
ros_esc_status.temperature_motor = vesc_status.state.temperature_motor;
ros_esc_status.temperature_pcb = vesc_status.state.temperature_pcb;
Expand Down
7 changes: 4 additions & 3 deletions src/mower_logic/cfg/MowerLogic.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ gen.add("mow_angle_increment", double_t, 0, "Mowing angle automatic increment. W
gen.add("tool_width", double_t, 0, "Width of the mower", 0.14, 0.1, 2)
gen.add("enable_mower", bool_t, 0, "True to enable mow motor", False)
gen.add("manual_pause_mowing", bool_t, 0, "True to disable mowing automatically", False)
gen.add("battery_empty_voltage", double_t, 0, "Voltage to return to docking station (over 20s interval)", 24.0, 20.0, 32.0)
gen.add("battery_critical_voltage", double_t, 0, "Voltage to return to docking station (immediate)", 23.0, 20.0, 32.0)
gen.add("battery_full_voltage", double_t, 0, "Voltage to start mowing again", 29.0, 20.0, 32.0)
gen.add("battery_empty_voltage", double_t, 0, "Voltage to return to docking station (over 20s interval)", 24.0, 20.0, 30.0)
gen.add("battery_critical_voltage", double_t, 0, "Voltage to return to docking station (immediate)", 23.0, 20.0, 30.0)
gen.add("battery_critical_high_voltage", double_t, 0, "Charge up to this voltage (hardcoded in Pico-FW)", 29.0, 23.0, 29.0)
Apehaenger marked this conversation as resolved.
Show resolved Hide resolved
gen.add("battery_full_voltage", double_t, 0, "Voltage to start mowing again", 28.0, 22.0, 29.0) # Hard to get a used battery above 28.3V with 29.2V-Charge
gen.add("motor_hot_temperature", double_t, 0, "Motor temperature to pause mowing", 70.0, 20.0, 150.0)
gen.add("motor_cold_temperature", double_t, 0, "Motor temperature to allow mowing", 40.0, 20.0, 150.0)
gen.add("max_position_accuracy", double_t, 0, "We allow driving as long as our position is better than this value (m)", 0.2, 0.01, 1.0)
Expand Down
319 changes: 161 additions & 158 deletions src/mower_logic/src/monitoring/monitoring.cpp

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/mower_msgs/msg/ESCStatus.msg
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ uint8 ESC_STATUS_STALLED=150
uint8 ESC_STATUS_OK=200
uint8 ESC_STATUS_RUNNING=201

uint8 status
uint8 status
float32 current
uint32 tacho
uint32 tacho
int16 rpm
float32 temperature_motor
float32 temperature_pcb
1 change: 1 addition & 0 deletions src/open_mower/launch/open_mower.launch
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<arg name="battery_empty_voltage" value="$(env OM_BATTERY_EMPTY_VOLTAGE)" />
<arg name="battery_critical_voltage" value="$(optenv OM_BATTERY_CRITICAL_VOLTAGE)" />
<arg name="battery_critical_high_voltage" value="$(optenv OM_BATTERY_CRITICAL_HIGH_VOLTAGE)" />

<node pkg="mower_map" type="mower_map_service" name="map_service" output="screen"/>
<node pkg="mower_logic" type="mower_logic" name="mower_logic" output="screen">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ mower_xesc:
max_motor_temp: 60
min_pcb_temp: 0
max_pcb_temp: 60
min_motor_rpm_critical: 2000
min_motor_rpm: 2800
max_motor_rpm: 3800
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
left_xesc:
xesc_type: "xesc_mini"
serial_port: "/dev/ttyAMA4"
motor_pole_pairs: 4 # Just needed for eRPM to RPM calculation
has_motor_temp: false
right_xesc:
xesc_type: "xesc_mini"
serial_port: "/dev/ttyAMA2"
motor_pole_pairs: 4 # Just needed for eRPM to RPM calculation
has_motor_temp: false
mower_xesc:
xesc_type: "xesc_mini"
serial_port: "/dev/ttyAMA3"
motor_pole_pairs: 4 # Just needed for eRPM to RPM calculation
has_motor_temp: true
min_motor_rpm_critical: 2000
min_motor_rpm: 2800
max_motor_rpm: 3800
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ mower_xesc:
max_motor_temp: 60
min_pcb_temp: 0
max_pcb_temp: 60
min_motor_rpm_critical: 2000
min_motor_rpm: 2500
max_motor_rpm: 3500
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ right_xesc:
mower_xesc:
xesc_type: "xesc_yfr4"
serial_port: "/dev/ttyAMA3"
motor_current_limit: 1.5
has_motor_temp: false
motor_current_limit: 1.2
min_pcb_temp: 0
max_pcb_temp: 60
max_pcb_temp: 70
min_motor_rpm_critical: 2000
min_motor_rpm: 2500
max_motor_rpm: 3500
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
left_xesc:
xesc_type: "xesc_mini"
serial_port: "/dev/ttyAMA4"
motor_pole_pairs: 4 # Just needed for eRPM to RPM calculation
has_motor_temp: false
right_xesc:
xesc_type: "xesc_mini"
serial_port: "/dev/ttyAMA2"
motor_pole_pairs: 4 # Just needed for eRPM to RPM calculation
has_motor_temp: false
mower_xesc:
xesc_type: "xesc_mini"
serial_port: "/dev/ttyAMA3"
motor_pole_pairs: 4 # Just needed for eRPM to RPM calculation
has_motor_temp: true
min_motor_rpm_critical: 2000
min_motor_rpm: 2500
max_motor_rpm: 3500
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
left_xesc:
xesc_type: "xesc_mini"
serial_port: "/dev/ttyAMA4"
motor_pole_pairs: 4 # Just needed for eRPM to RPM calculation
has_motor_temp: false
right_xesc:
xesc_type: "xesc_mini"
serial_port: "/dev/ttyAMA2"
motor_pole_pairs: 4 # Just needed for eRPM to RPM calculation
has_motor_temp: false
mower_xesc:
xesc_type: "xesc_yfr4"
serial_port: "/dev/ttyAMA3"
motor_current_limit: 1.5
has_motor_temp: false
motor_current_limit: 1.2
min_pcb_temp: 0
max_pcb_temp: 60
max_pcb_temp: 70
min_motor_rpm_critical: 2000
min_motor_rpm: 2500
max_motor_rpm: 3500
2 changes: 1 addition & 1 deletion web/.last_build_id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
34acc467291f864bebe467aee677b931
379cc430ca1a4294575b1bc4e1b9113c
2 changes: 1 addition & 1 deletion web/assets/AssetManifest.bin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
&assets/google_fonts/Roboto-Regular.ttf asset&assets/google_fonts/Roboto-Regular.ttf2packages/cupertino_icons/assets/CupertinoIcons.ttf asset2packages/cupertino_icons/assets/CupertinoIcons.ttfMpackages/flutter_material_design_icons/assets/materialdesignicons-webfont.ttf assetMpackages/flutter_material_design_icons/assets/materialdesignicons-webfont.ttf
&assets/google_fonts/Roboto-Regular.ttf asset&assets/google_fonts/Roboto-Regular.ttf2packages/cupertino_icons/assets/CupertinoIcons.ttf asset2packages/cupertino_icons/assets/CupertinoIcons.ttfMpackages/flutter_material_design_icons/assets/materialdesignicons-webfont.ttf assetMpackages/flutter_material_design_icons/assets/materialdesignicons-webfont.ttfApackages/geekyants_flutter_gauges/assets/fonts/Roboto-Regular.ttf assetApackages/geekyants_flutter_gauges/assets/fonts/Roboto-Regular.ttf
Expand Down
2 changes: 1 addition & 1 deletion web/assets/AssetManifest.bin.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"DQMHJmFzc2V0cy9nb29nbGVfZm9udHMvUm9ib3RvLVJlZ3VsYXIudHRmDAENAQcFYXNzZXQHJmFzc2V0cy9nb29nbGVfZm9udHMvUm9ib3RvLVJlZ3VsYXIudHRmBzJwYWNrYWdlcy9jdXBlcnRpbm9faWNvbnMvYXNzZXRzL0N1cGVydGlub0ljb25zLnR0ZgwBDQEHBWFzc2V0BzJwYWNrYWdlcy9jdXBlcnRpbm9faWNvbnMvYXNzZXRzL0N1cGVydGlub0ljb25zLnR0ZgdNcGFja2FnZXMvZmx1dHRlcl9tYXRlcmlhbF9kZXNpZ25faWNvbnMvYXNzZXRzL21hdGVyaWFsZGVzaWduaWNvbnMtd2ViZm9udC50dGYMAQ0BBwVhc3NldAdNcGFja2FnZXMvZmx1dHRlcl9tYXRlcmlhbF9kZXNpZ25faWNvbnMvYXNzZXRzL21hdGVyaWFsZGVzaWduaWNvbnMtd2ViZm9udC50dGY="
"DQQHJmFzc2V0cy9nb29nbGVfZm9udHMvUm9ib3RvLVJlZ3VsYXIudHRmDAENAQcFYXNzZXQHJmFzc2V0cy9nb29nbGVfZm9udHMvUm9ib3RvLVJlZ3VsYXIudHRmBzJwYWNrYWdlcy9jdXBlcnRpbm9faWNvbnMvYXNzZXRzL0N1cGVydGlub0ljb25zLnR0ZgwBDQEHBWFzc2V0BzJwYWNrYWdlcy9jdXBlcnRpbm9faWNvbnMvYXNzZXRzL0N1cGVydGlub0ljb25zLnR0ZgdNcGFja2FnZXMvZmx1dHRlcl9tYXRlcmlhbF9kZXNpZ25faWNvbnMvYXNzZXRzL21hdGVyaWFsZGVzaWduaWNvbnMtd2ViZm9udC50dGYMAQ0BBwVhc3NldAdNcGFja2FnZXMvZmx1dHRlcl9tYXRlcmlhbF9kZXNpZ25faWNvbnMvYXNzZXRzL21hdGVyaWFsZGVzaWduaWNvbnMtd2ViZm9udC50dGYHQXBhY2thZ2VzL2dlZWt5YW50c19mbHV0dGVyX2dhdWdlcy9hc3NldHMvZm9udHMvUm9ib3RvLVJlZ3VsYXIudHRmDAENAQcFYXNzZXQHQXBhY2thZ2VzL2dlZWt5YW50c19mbHV0dGVyX2dhdWdlcy9hc3NldHMvZm9udHMvUm9ib3RvLVJlZ3VsYXIudHRm"
2 changes: 1 addition & 1 deletion web/assets/AssetManifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"assets/google_fonts/Roboto-Regular.ttf":["assets/google_fonts/Roboto-Regular.ttf"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"],"packages/flutter_material_design_icons/assets/materialdesignicons-webfont.ttf":["packages/flutter_material_design_icons/assets/materialdesignicons-webfont.ttf"]}
{"assets/google_fonts/Roboto-Regular.ttf":["assets/google_fonts/Roboto-Regular.ttf"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"],"packages/flutter_material_design_icons/assets/materialdesignicons-webfont.ttf":["packages/flutter_material_design_icons/assets/materialdesignicons-webfont.ttf"],"packages/geekyants_flutter_gauges/assets/fonts/Roboto-Regular.ttf":["packages/geekyants_flutter_gauges/assets/fonts/Roboto-Regular.ttf"]}
2 changes: 1 addition & 1 deletion web/assets/FontManifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"Roboto","fonts":[{"asset":"assets/google_fonts/Roboto-Regular.ttf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]},{"family":"packages/flutter_material_design_icons/Material Design Icons","fonts":[{"asset":"packages/flutter_material_design_icons/assets/materialdesignicons-webfont.ttf"}]}]
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"Roboto","fonts":[{"asset":"assets/google_fonts/Roboto-Regular.ttf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]},{"family":"packages/flutter_material_design_icons/Material Design Icons","fonts":[{"asset":"packages/flutter_material_design_icons/assets/materialdesignicons-webfont.ttf"}]},{"family":"packages/geekyants_flutter_gauges/Roboto","fonts":[{"asset":"packages/geekyants_flutter_gauges/assets/fonts/Roboto-Regular.ttf"}]}]
Loading
Loading