-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Rover holonomic #2388
Rover holonomic #2388
Conversation
This way, it will not explicitly rely on COMMAND_THRUST or COMMAND_THROTTLE or any variant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
Some small comments but fine.
|
||
#include "std.h" | ||
|
||
#define SPEED_NEUTRAL 500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these defines, variables and structs are only used in the associated source file and not needed by other source files, can you move them to the source file for clarity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
uart_put_buffer(dev, 0, raw_message.bytes, 9); | ||
} | ||
|
||
void actuators_ostrich_event() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the event is not used I would suggest removing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was to receive encoders values, but not done yet, I removed it for now
|
||
// helper macro to set AP throttle value | ||
#define SetAPThrottleFromCommands(_cmd_x, _cmd_y) { \ | ||
autopilot.throttle = sqrtf((_cmd_x * _cmd_x) + (_cmd_y * _cmd_y)) / 1.4142f; /* sqrt(2) */ \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also put the / 2 inside the sqrtf if that makes it more clear (and more decimal places).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
* [autopilot] add a throttle command that will be used to report on GCS This way, it will not explicitly rely on COMMAND_THRUST or COMMAND_THROTTLE or any variant * [rover] add holonomic guidance for rovers
Add basic support for holonomic rovers.
In addition, a
throttle
field have been added to the general autopilot structure that is used to report the global throttle level to the GCS strip. This way, the relevant message in each firmware doesn't need to know explicitly the name of the command (sometimesCOMMAND_THRUST
orCOMMAND_THROTTLE
or more complex in case of holonomic rover)