Robotics StackExchange | Archived questions

Issues staring tf/static_transform_publisher for neato XV-11

I am running the following launch file on my Raspberry Pi Indigo installation.

<?xml version="1.0"?>

<launch>
  <node pkg="xv_11_laser_driver" type="neato_laser_publisher" name="xv_11_node">
    <!--<param name="port" value="/dev/tty.usbserial-A9UXLBBR"/>-->
    <param name="port" value="/dev/ttyUSB0"/>
    <param name="firmware_version" value="2"/>
    <param name="frame_id" value="laser"/>
  </node>
  <node pkg="tf" type="static_transform_publisher" name="base_frame_2_laser" ar$

</launch>

But I am getting the following error

ERROR: cannot launch node of type [tf/statictransformpublisher]: tf

ROS path [0]=/opt/ros/indigo/share/ros

ROS path [1]=/opt/ros/indigo/share

ROS path [2]=/opt/ros/indigo/stacks

I have tried to build the tf package from source by cloning the git repository into "catkinws/src/tf" and running catkinmake from "~/catkin_ws" which is my workspace.

I am a ROS beginner and I'm having a lot of trouble getting this to work.

Thank you for you help

Asked by jaymo3141 on 2016-02-25 05:03:22 UTC

Comments

Answers

ROS is only looking for tf in the folders specified in your error output. It should work, if you have installed tf as a debian package. Check with dpkg -s ros-indigo-tf

If you want to launch the one built from source, you need to source your catkin workspace. I.e. in every terminal do a source ~/catkin_ws/devel/setup.bash (you can add this to your .bashrc for having it done automatically).

Asked by mgruhler on 2016-03-01 02:33:34 UTC

Comments

running dpkg -s ros-indigo-tf indicates that the package is not installed. How do I install it?

Asked by jaymo3141 on 2016-03-01 21:38:26 UTC

Either install as debian package sudo apt-get install ros-indigo-tf or from source. See the ROS wiki how to do this.

If you are running UbuntuARM, you might need to check this page

Asked by mgruhler on 2016-03-02 01:57:46 UTC

Once you've fixed the tf installation issue, here's how to properly run a static_transform_publisher from your launch file:

  <node pkg="tf" type="static_transform_publisher" name="base_frame_2_laser"
  args="0 0 0.05 0 0 0 1 /base_link /laser 50" />

Here I've assumed that the LiDAR is attached at z = +5cm and its orientation is the same as the robot's base link. The number 50 is the publishing rate, which could be lower.

Asked by spmaniato on 2016-03-02 19:17:54 UTC

Comments