Gazebo Answers logo

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.

Originally posted by an on Gazebo Answers with karma: 3 on 2014-09-16

Post score: 1


1 Answer 1


Gazebo Answers logo

in my un-merged branch


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.

Originally posted by hsu with karma: 1873 on 2014-09-16

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.