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

Rover holonomic #2388

Merged
merged 3 commits into from
Feb 7, 2019
Merged

Rover holonomic #2388

merged 3 commits into from
Feb 7, 2019

Conversation

gautierhattenberger
Copy link
Member

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 (sometimes COMMAND_THRUST or COMMAND_THROTTLE or more complex in case of holonomic rover)

This way, it will not explicitly rely on COMMAND_THRUST or
COMMAND_THROTTLE or any variant
kirkscheper
kirkscheper previously approved these changes Feb 7, 2019
Copy link
Member

@kirkscheper kirkscheper left a 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
Copy link
Member

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?

Copy link
Member Author

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() {}
Copy link
Member

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.

Copy link
Member Author

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) */ \
Copy link
Member

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).

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@gautierhattenberger gautierhattenberger merged commit 926e570 into master Feb 7, 2019
@gautierhattenberger gautierhattenberger deleted the rover_holonomic branch February 7, 2019 10:05
noether pushed a commit to noether/paparazzi that referenced this pull request Jun 7, 2019
* [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants