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

Not clear OFFBOARD mode #514

Closed
tuloski opened this issue Jul 8, 2019 · 8 comments · Fixed by #545
Closed

Not clear OFFBOARD mode #514

tuloski opened this issue Jul 8, 2019 · 8 comments · Fixed by #545

Comments

@tuloski
Copy link

tuloski commented Jul 8, 2019

Here https://docs.px4.io/en/flight_modes/offboard.html it's written that in OFFBOARD mode the vehicle position, velocity, or thrust (SET_POSITION_TARGET_LOCAL_NED) can be controlled.

What does the OR stands for? What if I send a SET_POSITION_TARGET_LOCAL_NED with position AND velocity (AND thrust)? Or should I only pick one to send (position or velocity or thrust)?

Can we have more info on how the setpoint is created and if it is useful or useless to send both position and velocity.

@hamishwillee
Copy link
Collaborator

hamishwillee commented Jul 9, 2019

@julianoes Can you comment on whether you can control position, velocity and thrust at the same time in offboard mode with SET_POSITION_TARGET_LOCAL_NED? Or can you only control one?

Looking at the code you can set them all at the same time and these are published to a UORB topic, but I can't work out whether the system will try an act on a setpoint that specifies position, velocity and thrust (and I imagine behaviour would be quite unpredictable).

@tuloski
Copy link
Author

tuloski commented Jul 9, 2019

Looking at the code you can set them all at the same time and these are published to a UORB topic, but I can't work out whether the system will try an act on a setpoint that specifies position, velocity and thrust (and I imagine behaviour would be quite unpredictable).

Yeah same. I'll try to look better at the code to understand this.

@julianoes
Copy link
Contributor

Yeah same. I'll try to look better at the code to understand this.

No idea, I'd have to do the same, sorry. Maybe @MaEtUgR or @Stifael know.

@hamishwillee
Copy link
Collaborator

Tried to get an answer here: https://px4.slack.com/archives/C3B9NSHRQ/p1564638280024600

@Stifael
Copy link
Contributor

Stifael commented Aug 1, 2019

SET_POSITION_TARGET_LOCAL_NED will eventually be handled in FlightTaskOffboard and currently it supports the following combination of setpoints: https://github.com/PX4/Firmware/blob/master/src/lib/FlightTasks/tasks/Offboard/FlightTaskOffboard.cpp#L166-L170

Important to know

  • there is no support for acceleration (independent of FlightTask), but rather acceleration is mapped directly to thrust-setpoint
  • only position- and velocity-setpoint combination is supported

@MaEtUgR is working on acceleration support (not sure about the current state). However, that "new" acceleration support does not mean that there will be a new control-loop, but rather acceleration-setpoints will be used as feedforward.

@Stifael
Copy link
Contributor

Stifael commented Aug 1, 2019

However, I honestly would first test if the current mavlink_interface actually is doing the right mapping (https://github.com/PX4/Firmware/blob/master/src/modules/mavlink/mavlink_receiver.cpp#L810-L819)

A long time ago I started this branch (Stifael/Firmware@afab1f6) together with this mavsdk changes (mavlink/MAVSDK#434) which allow for additional combination

@MaEtUgR
Copy link
Member

MaEtUgR commented Aug 2, 2019

@MaEtUgR is working on acceleration support (not sure about the current state).

It's part of #12072. I wanted to be finished a long time ago but found small bugs and was always interrupted while fixing them with "more important" things. My next goal is to really finish this up now.

@hamishwillee
Copy link
Collaborator

Thanks very much @Stifael and @MaEtUgR . I have created #545 to fix this - reflecting exactly what it says is supported in code. Note that I haven't actually "checked" the assignment - bit out of scope for a doc update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants