naoqi_driver: using externel odometry / remapping tf

30 views
Skip to first unread message

Lukas Probsthain

unread,
Jan 26, 2021, 9:12:36 AM1/26/21
to ROS Sig Aldebaran
Hey,

I'm trying to use external sensors for SLAM.

I want to use the external sensors and a map for localization.
But as it seems the tf tree is hardcoded in naoqi_driver...

My plan was to remap the "/tf" topic to "/tf_old" and then do the transformation with the new odom frame with a tf_remap node.

I was trying to do
<launch>
  <arg .../>
  <remap from="tf"       to="tf_old"/>
  <node pkg="naoqi_driver" type="naoqi_driver_node" .../>
</launch>

and
<launch>
  <arg .../>
  <node pkg="naoqi_driver" type="naoqi_driver_node" ...>
    <remap from="tf"       to="tf_old"/>
  </node>
</launch>

and
roslaunch naoqi_driver naoqi_driver.launch /tf:=/tf_old

but none of it works.
Has anybody done something like that before with naoqi_driver?

Thanks
Lukas

Lukas Probsthain

unread,
Jan 29, 2021, 11:24:45 AM1/29/21
to ROS Sig Aldebaran
I found a solution myself:

As it seems, the remapping of the /tf topic is not possible. It's only suggested a few times on the web for recorded rosbags. Maybe remapping works there.
Maybe naoqi_driver is the cause - I can't remap any of the topics from this package!?

I ended up modifying the source code of the naoqi_driver package.
Main problem for me was that naoqi_driver publishes the visual odometry of the naoqi framework as an odom->base_link transform in tf.
So I just removed that line that publishes to tf.

The next problem was that the base_footprint frame was published as a base_link->base_footprint transform.
I wanted to publish my own odom->[robot] transform to base_footprint as it is easier to create the odometry with robot_localization on ground level.
The base_link->base_footprint transform was calculated by naoqi_driver based on the odom frame.
I changed the calculation based on the transform from base_link to r_sole and l_sole frames and published it in reverse direction compared to before (base_footprint->base_link).

Therefore the new base_footprint frame published by naoqi_driver is independent of the surrounding.
Then I could do my odom->base_footprint transform with robot_localization and map->base_footprint transform with rtabmap_ros.

I also experimented with robot_state_publisher + urdf but it didn't publish the static joints...
Reply all
Reply to author
Forward
0 new messages