How to implement camera gimbal?
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
Asked by TobiMiller on 2016-06-01 05:33:58 UTC
Answers
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: gimbel_demo.world
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.
Asked by Peter Mitrano on 2016-06-01 19:00:15 UTC
Comments
http://pastebin.com/raw/Zc0yGLS1 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.
Asked by TobiMiller on 2016-06-02 02:01:26 UTC
I'll make a demo sdf and upate my answer
Asked by Peter Mitrano on 2016-06-04 17:06:00 UTC
Thanks. But i think it is not working properly in gazebo 6. it prints some warnings and one error. http://pastebin.com/raw/MZLzdvbB (crappy hyperlinking in this forum...)
Asked by TobiMiller on 2016-06-07 03:35:52 UTC
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: https://gist.github.com/PeterMitrano/a645f8047c353d2696a2de38053ab9e0
Asked by Peter Mitrano on 2016-06-08 22:03:52 UTC
Comments