Gazebo | Ignition | Community
Ask Your Question

How to implement camera gimbal?

asked 2016-06-01 05:33:58 -0500

TobiMiller gravatar image

updated 2016-06-02 01:30:38 -0500

Hey there. I am working with the PX4 Firmware "software in the loop". on the standard IRIS quadrocopter a fixed camera module is mounted. i want to get this camera looking straight downward to the ground even if the quad is tilted. like a gimbal would do. does anybody have a clue how to implement this?

Thx in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-06-01 19:00:15 -0500

updated 2016-06-04 17:49:10 -0500

I'm not familiar with the PX4 project, but you can add a camera to the SDF file, and put it on a revolute2 or ball joint (so it can rotate X and Y, or Z for ball joint if you want), and give them no friction or damping. Gravity should just let it hang perfectly assuming you don't have any wind plugins running.

Here's a demo:

Use the joint panel on the left to move the red and green links to see that it does work.

You can add a camera to the blue cube. In your case, just make the joint like I did directly to your quadcopter chassis. I only made the other links to demonstrate the motion.

edit flag offensive delete link more

Comments Is it like you meant?I am not really in to SDF files :( i have no overview of the possibilities. actually it is rotating by itself.

TobiMiller gravatar imageTobiMiller ( 2016-06-02 02:01:26 -0500 )edit

I'll make a demo sdf and upate my answer

Peter Mitrano gravatar imagePeter Mitrano ( 2016-06-04 17:06:00 -0500 )edit

Thanks. But i think it is not working properly in gazebo 6. it prints some warnings and one error. (crappy hyperlinking in this forum...)

TobiMiller gravatar imageTobiMiller ( 2016-06-07 03:35:52 -0500 )edit

oh yea I made it with 7, let me downgrade it for you. It will work in any version of sdf, but the gazebo model editor happened to use some 7 only stuff. try it now:

Peter Mitrano gravatar imagePeter Mitrano ( 2016-06-08 22:03:52 -0500 )edit

Question Tools

1 follower


Asked: 2016-06-01 05:33:58 -0500

Seen: 2,905 times

Last updated: Jun 04 '16