How to add a camera/gimbal frame for a drone in TF without URDF

asked 2021-04-09 01:17:15 -0500

Tawfiq Chowdhury gravatar image

I have previously worked with a PR2 robot which has a Kinect on it and the URDF file of the PR2 was modified so that the Kinect coordinate frame could be added to it so that the robot state publisher publishes that to TF. I am currently working with an IF750 drone that can be controlled through mavlink messages through mavros and while using the actual drone, no simulated drone is required and there is no URDF file for the drone in PX4 Gazebo. The code can directly send messages to the flight controller without simulation. Now, I have a gimbal and the camera and I need to have the pose of those. Since the gimbal moves the camera, I want to add a coordinate frame for the gimbal so that TF can perform a transformation from the gimbal coordinate frame to the drone's base coordinate frame. I need to know how can I permanently add a moving coordinate frame for the gimbal which will provide me the pose of the gimbal with respect to the base reference frame of the drone. I know there are tutorials for TF and URDF but I think they need a URDF file to edit whereas for the drone, I don't have a URDF file. I understand that in order to add a new frame, I need to manually calculate its pose first with respect to the base reference frame of the drone which can be used by TF but without an URDF file, I am not sure where to use that information.

edit retag flag offensive close merge delete