Skip to content

Conversation

@Williangalvani
Copy link
Member

@Williangalvani Williangalvani commented Jun 28, 2024

fix #1840

Screen.Recording.2024-06-29.at.00.17.43.mov

@Williangalvani Williangalvani changed the title Motor detect Add interface for automatic motor reversion detection Jun 28, 2024
Copy link
Collaborator

@ES-Alexander ES-Alexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the vehicle fails to arm before a motor test because it is not in manual mode, there should be a button option to switch to manual mode (instead of just giving an error message). Alternatively the "arm" toggle could be reconfigured to automatically switch to manual mode as part of the arming process.


During the test it would be good if we can display the MAVLink INFO and WARNING status texts that get generated.


If the test fails, it would be good to display the following to help with troubleshooting:

Motor testing will fail due to any unexpected motions of the vehicle. Here are some common failure causes, and potential solutions:

Cause Solutions
no movement - ensure the vehicle is in the water
- ensure the ESC is powered and receiving valid signals
- ensure the thruster is connected to the ESC
external movement - ensure the vehicle is in calm water
poor movement estimation - ensure the sensors are well calibrated
- ensure the vehicle is not too close to large magnetic disturbances
incorrect frame selection - choose the frame that matches your vehicle (or make a custom one)
- ensure the frame's motion contribution factors suit the positions and orientations of your thrusters relative to the vehicle's centers of mass and volume (you may need to trim with ballast and/or buoyancy)
incorrect motor mapping - ensure the thrusters are connected to the correct output channels of the flight controller, and in the correct order to match the frame numbering

If necessary it is possible to manually test and set the motor spin directions instead.

@ES-Alexander
Copy link
Collaborator

Potential image design:
motor_reversal

@Williangalvani Williangalvani force-pushed the motor_detect branch 7 times, most recently from ed5ad80 to d44ee6b Compare July 2, 2024 18:10
@Williangalvani Williangalvani marked this pull request as ready for review July 2, 2024 18:10
Copy link
Member

@patrickelectric patrickelectric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image is not showing here:

image

Can we justify the text as well ?

@patrickelectric
Copy link
Member

Is it possible to finish this before tomorrow ? We kind of need it for the stable release.

@Williangalvani
Copy link
Member Author

Is it possible to finish this before tomorrow ? We kind of need it for the stable release.

yep, planning to wrap it up today

@Williangalvani Williangalvani force-pushed the motor_detect branch 2 times, most recently from 62c3656 to 0f194f0 Compare July 8, 2024 15:11
},
disarm() {
this.armDisarm(false, true)
armDisarm(false, true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing await here, right ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we dont have to have an await there, unlike python, js will run the code regardless. as (now) there's nothing after it, I don't see the need. it would probably require a bunch of ther asyncs around the code. but I can do it if you want.

I did realise there was duplicated logic and removed the timeout, though, as we do have a timeout in the helper functions

Copy link
Collaborator

@ES-Alexander ES-Alexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SMS color requests

Copy link
Collaborator

@ES-Alexander ES-Alexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I still can't see the image (including in incognito mode)
    Screenshot 2024-07-09 at 10 29 53 AM
    • Patrick also mentioned this in an earlier review
  2. The status updates are inconsistent / sometimes get missed:
    Screenshot 2024-07-09 at 10 33 27 AM
    Screenshot 2024-07-09 at 10 34 06 AM
  3. The status text looks a bit too 'normal', especially when the test fails (at which point it just kind of looks like a description)
    Screenshot 2024-07-09 at 10 34 06 AM
    • it would be nice if we could colour it based on severity (e.g. --success for steps that work, --warning for bad thrust, and --critical for failure)

@Williangalvani Williangalvani force-pushed the motor_detect branch 2 times, most recently from 7593843 to 7f4be9d Compare July 9, 2024 01:37
Copy link
Collaborator

@ES-Alexander ES-Alexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! :D

I've confirmed the image is appearing now, and I was unable to replicate the earlier issue where some of the status text was getting missed :-)

Some minor suggestions around clarity and neatness. Feel free to merge afterwards :-)

@Williangalvani Williangalvani merged commit 8979e5f into bluerobotics:master Jul 9, 2024
@Williangalvani Williangalvani deleted the motor_detect branch July 9, 2024 12:31
@ES-Alexander ES-Alexander added the docs-needed Change needs to be documented label Aug 12, 2024
@ES-Alexander ES-Alexander added docs-minimal Documentation exists but should be improved and removed docs-needed Change needs to be documented labels Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-minimal Documentation exists but should be improved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vehicle-setup: it should be possible to trigger automatic motor detection for ArduSub

3 participants