0
$\begingroup$

Rosanswers logo

I am using HectorSLAM for a UAV application. I have setup HectorSLAM to work with just the base_link and laser frames as shown below. (Following these instructions: link text) This works for static mapping but obviously does not take into account the rotation and vertical position of the laser scanner. The question has 2 parts:

  1. How do I insert frames (such as the base_stabilized frame) into the tf frames tree
  2. How do setup this frame (for example between base_stabilized) to read data from an IMU. I am using the Pixhawk 4 mini flight controller, which uses QGroundControl to allow data from the PIxhawk to be read. Many Thank for your help.

image description


Originally posted by SamH on ROS Answers with karma: 27 on 2020-02-06

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I can answer Q1, Q2 is solely dependent on your application and I'm not going to go into application specifics.

How do I insert frames

I'm glad you asked! There's a great tutorial here (http://wiki.ros.org/tf2/Tutorials/Adding%20a%20frame%20%28C%2B%2B%29) that discusses it. The core bit is that in your node (or create a new node) you create a Transform message with the parent (root) and child (child) of the transformation tree frames with their relative current position and orientation. An example from your tree is that the base_link is the parent to laser, so something is publish that frame via code similar to this tutorial to TF. So if you want to add a base_stabilized from base_link, you just need to make a message via that tutorial publishing it with whatever pose information is appropriate.


Originally posted by stevemacenski with karma: 8272 on 2020-02-06

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by SamH on 2020-02-07:
Thank you again! I'll work my way through that. I have managed to subscribe to the messages being published by the IMU without using QGroundControl, so once I've added the new frame I'll get that frame listening to the IMU data.

$\endgroup$

Your Answer

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