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

[nps] load aircraft into gazebo at run time + actuator handling #2135

Merged
merged 2 commits into from
Oct 26, 2017

Conversation

kirkscheper
Copy link
Member

This enables gazebo to grab the quadrotor configuration from the airframe file and load up the correct model. This also ensures that the same yaw configuration is used for the simulator as is defined in the motor_mixing to reduce possible user error. Now the only thing is that the order of the actuator names still has to be correct.

Secretly, this also refractors how GPS is ignored in nps. As well as replaces course with heading when GPS_DATALINK is used so that nps correctly copies reality when using natnet/optitrack.

@knmcguire and @tomvand can you take a look here and let me know if there are any issues.

<define name="ACTUATOR_THRUSTS" value="1.55, 1.55, 1.55, 1.55" type="double[]"/>
<define name="ACTUATOR_TORQUES" value="0.155, 0.155, 0.155, 0.155" type="double[]"/>

<define name="GAZEBO_WORLD" value="ardrone.world" type="string"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be "empty.world"?

@tomvand
Copy link
Contributor

tomvand commented Oct 25, 2017

Looks good. Found no obvious errors in the changes and the simulation appears to work fine. Spawning the aircraft model specified in the airframe xml is definitely a nice addition!

I could not confirm the working of the datalink GPS heading. As far as I'm aware the AHRS is not fully functional in gazebo atm. (I tried a short test flight without bypassed AHRS but this resulted in uncontrolled behavior both with and without the datalink gps); when the AHRS is bypassed, the GPS heading is overwritten by the ground truth value. I have not yet checked if this would be a quick fix to get a reasonable heading estimate during the accelerometer callback.

Note that this update will require existing gazebo worlds to be modified, the existing drone needs to be removed just as you did for the empty world.

One minor suggestion: could you rename the simple_quad model to simple_plus_quad? Makes the name a bit more descriptive and highlights the difference with the simple_x_quad. (Or is this an existing naming convention from jsbsim?)

@kirkscheper
Copy link
Member Author

"I could not confirm the working of the datalink GPS heading. As far as I'm aware the AHRS is not fully functional in gazebo atm. (I tried a short test flight without bypassed AHRS but this resulted in uncontrolled behavior both with and without the datalink gps); when the AHRS is bypassed, the GPS heading is overwritten by the ground truth value. I have not yet checked if this would be a quick fix to get a reasonable heading estimate during the accelerometer callback."

This is quite strange, when I build and run the airframe in my conf it works just fine, the vehicle heading is correct and the ahrs works fine (I don't bypass AHRS or INS).

"One minor suggestion: could you rename the simple_quad model to simple_plus_quad? Makes the name a bit more descriptive and highlights the difference with the simple_x_quad. (Or is this an existing naming convention from jsbsim?)"

I thought the same here, I actually thought of simple_quad_x and simple_quad_plus (or simple_quad_+ if that is allowed) but in the end decided on the same naming as with jsbsim. We can of course also rename those. The question is how strongly do you feel about this?
screenshot from 2017-10-25 18-32-51

@tomvand
Copy link
Contributor

tomvand commented Oct 25, 2017

Have you tried changing the nav_heading in the settings? That caused the drone to become unstable around the yaw axis when I tried it.

I have no strong feelings about the simple quad naming. If it's too much work to rename the jsbsim one (not sure how often its referenced in all the airframe files) it's fine to leave this as it is.

@kirkscheper
Copy link
Member Author

Just tried the nav_heading step, no issues!

@tomvand
Copy link
Contributor

tomvand commented Oct 25, 2017 via email

@kirkscheper kirkscheper merged commit 3bf4b87 into paparazzi:master Oct 26, 2017
@kirkscheper kirkscheper deleted the gazebo_actuators branch October 26, 2017 12:36
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