Sensor that follows quadcopter

asked 2019-10-16 14:30:52 -0600

duntzm gravatar image

Hi, I am new to Gazebo and trying to adapt the Iris drone SiTL Gazebo sim for my use. I would like to add a camera sensor that follows the drone and films it.

I have added the link and sensor to the drone model but am having trouble with describing the joint to get the desired behavior. If I use a fixed joint, the camera follows at the correct distance but when the drone pitches over to move the camera pitches with it and gets the ground as the background. I believe this happens because the drone's base link frame rotates with the pitch, and so does the camera since it's displacement is defined by this frame.

I would like something like what I have set my GUI camera to do using track_visual and static, where the camera follows the drone but does not pitch over when the drone does (i.e. follow the drone's position and yaw but its reference frame's pitch or roll).

Here is the code I use for the GUI camera, but I do not think the same features are supported for actual sensors.

<gui fullscreen="0"> <camera name="user_camera"> <track_visual> <name>iris</name> <static>true</static> <use_model_frame>true</use_model_frame> <xyz>-3 0 1</xyz> <inherit_yaw>true</inherit_yaw> </track_visual> </camera> </gui>

Thanks so much

edit retag flag offensive close merge delete

Comments

Hello, did you try with a ball joint?

mxch_18 gravatar imagemxch_18 ( 2019-10-30 06:33:29 -0600 )edit