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

FW position controller does not run without global position #5123

Open
RomanBapst opened this issue Jul 22, 2016 · 11 comments
Open

FW position controller does not run without global position #5123

RomanBapst opened this issue Jul 22, 2016 · 11 comments

Comments

@RomanBapst
Copy link
Contributor

RomanBapst commented Jul 22, 2016

Ekf2 does not always publish global position. Since the fw position controller polls on the global position
it does not run in that case.

@RomanBapst RomanBapst self-assigned this Jul 22, 2016
@julianoes
Copy link
Contributor

This shouldn't be a problem since position based modes aren't available if global position is not valid. And if they are available, it's therefore a bug.

@dagar
Copy link
Member

dagar commented Jul 22, 2016

Altitude control mode without global position?

@dagar
Copy link
Member

dagar commented Jul 22, 2016

Position control could also switch to _l1_control.navigate_heading().

@RomanBapst
Copy link
Contributor Author

@dagar Ping :) you probably rememer this.

@julianoes
Copy link
Contributor

Position control could also switch to _l1_control.navigate_heading().

This is logic that the commander should do and not a controller.

@Tumbili what exactly are you suggesting? You can't control position without knowing position, right?

@dagar
Copy link
Member

dagar commented Oct 17, 2016

We're mainly talking about FW altitude control mode.

@RomanBapst
Copy link
Contributor Author

@julianoes @dagar I'll probably be looking at this in the next few days.
I'll be reporting back.

@dagar
Copy link
Member

dagar commented Dec 1, 2016

@Tumbili any thoughts of what we should do here? Ideally ALTCTL should work without global position, but if we can't do that easily at a minimum we need to make it required for FW in the state machine.

@AlexisPotvin FYI

@RomanBapst
Copy link
Contributor Author

@dagar We have decided to get rid of the global position topic on the controller side. We have one position topic which has flags giving information about the scope of the position estimate. We didn't really (at least on the controller side) see a benefit of having two topics. However, we still publish global position because other parts of the system still rely on it (e.g commander or maybe even QGC).

I liked the idea of having a piece of code or a module which polls on a specific topic and only runs once the topic updates. However, you will run into corner cases like altitude control for the fw position controller and in the end you will be using flags again. I'm not saying that it's not possible to do it!

What's your opinion on this?

@dagar
Copy link
Member

dagar commented Dec 2, 2016

I don't necessarily want to distract from real work with refactoring/reorganization discussion that you may have already completed (differently), but since you asked...

I didn't really have an opinion before, but now that I look at the messages more closely it certainly would be nice to have more granularity, split them logically, and remove any duplication. I think it's very helpful for understanding the architecture, readability/discoverability (my own sanity), the nice topic poll/run pattern, and of course our new logging.

In the fw position controller case I think using local position for altitude and position control modes is relatively easy, we just need to be careful with TECS between modes. I volunteer to make the change if you're interested in going this way.

Are you aware of the other corner cases?

While we're on the topic, would it make sense to split up the massive position_setpoint message, instead using the individual setpoint messages for velocity, force, local_position? In general is it good practice/design to have a module that in different modes both subscribes and publishes the same message at different times? Eg the position controller subscribes to velocity_setpoints in offboard control mode, but otherwise publishes them.

@PX4BuildBot
Copy link
Collaborator

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 30 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

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

No branches or pull requests

4 participants