Home | Tutorials | Wiki | Issues
Ask Your Question
1

How can you fly the plane provided in plane_demo.world?

asked 2014-09-16 09:18:06 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I have created a ros node that takes inputs from the keyboard, to distinguish between going forward/backward, turning left/right, and going up/down.

I can control the forward/backward easily (I just publish a twist message with the linear x component set to either a positive or negative number).

I cannot figure out how to control the other things, though. To turn the plane, I allow wing 5 (vertical stabilizer, which controls yaw) to revolve around the z axis, and I publish twist messages to that link. This "works," in that I can clearly see wing5 rotating around the z axis. Now, logically, this should affect the direction that the plane travel but I dont understand how to implement that. For example, I tried setting wing5 to rotate, and then setting the plane's linear x velocity... however, this just moves the entire model in the +x direction, instead of moving in a direction that makes sense with the way wing5 is positioned.

How do I control the plane's pitch and yaw?

I see videos on youtube by John Hsu, flying this model around, so I know it has been done. Any help would be appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-09-16 20:16:19 -0600

hsu gravatar image

updated 2014-09-17 10:48:46 -0600

in my un-merged branch

https://bitbucket.org/osrf/gazebo/pull-request/1204/plane-demo-with-controls/diff

there is a PlaneDemoPlugin that does the controls. Fly with caution :) <-- By this I mean much of the plugin is untested. If/when you find obvious mistakes or ways to improve implementation in my plugin, please feel free to comment in the gazebo issue tracker or the pull request.

To run this demo, start gazebo by:

gazebo --verbose [path to gazebo source]/worlds/plane_demo.world

in the terminal where gazebo is started, press a key to add thrust, z key reduces thrust, arrows to control roll and pitch, c key centers all control surfaces.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2014-09-16 09:18:06 -0600

Seen: 393 times

Last updated: Sep 17 '14