ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Fixed Frame [map] does not exist

asked 2017-06-12 14:32:03 -0500

OneLeggedPirate gravatar image

Hi.

I'm asking this question after going through almost every thread with similar questions, but still unable to solve this issue. I'll elaborate all steps I'm doing to make it easy for troubleshooting.

I'm trying to run this package. I'm using two Logitech C270 USB cameras and the usb_cam package. The launch file looks like this:

<launch>
  <group ns="camera1">
    <node name="usb_cam1" pkg="usb_cam" type="usb_cam_node" output="screen" >
        <param name="video_device" value="/dev/video0" />
        <param name="image_width" value="640" />
        <param name="image_height" value="480" />
        <param name="pixel_format" value="yuyv" />
        <param name="camera_frame_id" value="yuyv" />
        <param name="io_method" value="mmap"/>
    </node>
    <node name="image_view" pkg="image_view" type="image_view" respawn="false" output="screen">
       <remap from="image" to="/camera1/usb_cam1/image_raw"/>
       <param name="autosize" value="true" />
    </node>
  </group>

  <group ns="camera2">
    <node name="usb_cam2" pkg="usb_cam" type="usb_cam_node" output="screen" >
      <param name="video_device" value="/dev/video1" />
      <param name="image_width" value="640" />
      <param name="image_height" value="480" />
      <param name="pixel_format" value="yuyv" />
      <param name="camera_frame_id" value="yuyv" />
     <param name="io_method" value="mmap"/>
   </node>
   <node name="image_view" pkg="image_view" type="image_view" respawn="false" output="screen">
     <remap from="image" to="/camera2/usb_cam2/image_raw"/>
     <param name="autosize" value="true" />
   </node>
  </group>
</launch>

Cameras are grabbing images and there's no issue. If I do a rostopic list I get these topics:

/camera1/image_view/output
/camera1/image_view/parameter_descriptions
/camera1/image_view/parameter_updates
/camera1/usb_cam1/camera_info
/camera1/usb_cam1/image_raw
/camera1/usb_cam1/image_raw/compressed
/camera1/usb_cam1/image_raw/compressed/parameter_descriptions
/camera1/usb_cam1/image_raw/compressed/parameter_updates
/camera1/usb_cam1/image_raw/compressedDepth
/camera1/usb_cam1/image_raw/compressedDepth/parameter_descriptions
/camera1/usb_cam1/image_raw/compressedDepth/parameter_updates
/camera1/usb_cam1/image_raw/theora
/camera1/usb_cam1/image_raw/theora/parameter_descriptions
/camera1/usb_cam1/image_raw/theora/parameter_updates
/camera2/image_view/output
/camera2/image_view/parameter_descriptions
/camera2/image_view/parameter_updates
/camera2/usb_cam2/camera_info
/camera2/usb_cam2/image_raw
/camera2/usb_cam2/image_raw/compressed
/camera2/usb_cam2/image_raw/compressed/parameter_descriptions
/camera2/usb_cam2/image_raw/compressed/parameter_updates
/camera2/usb_cam2/image_raw/compressedDepth
/camera2/usb_cam2/image_raw/compressedDepth/parameter_descriptions
/camera2/usb_cam2/image_raw/compressedDepth/parameter_updates
/camera2/usb_cam2/image_raw/theora
/camera2/usb_cam2/image_raw/theora/parameter_descriptions
/camera2/usb_cam2/image_raw/theora/parameter_updates
/rosout
/rosout_agg

Now I run the nodes as described in the README file here. When I run rviz , I get these

No tf data. Actual error: Fixed Frame [map] does not exist

So I used gmapping as pointed out here

rosrun gmapping slam_gmapping

this time I do get Global Status: Ok Fixed Frame: Ok .

Now I can add a new display of the topic /camera_left_rect/disparity_map and disparity map is shown without any problem.

But if I add a new display of the topic /camera_left_rect/point_cloud (where point cloud is the output) I get this error:

Transform [sender=unknown_publisher] For frame [jackal]: Frame [jackal] does not exist

I did rosrun tf view_frames and the output is this.

Where am I doing wrong? Please help.

edit retag flag offensive close merge delete

Comments

Could you please attach your view_frames sshot to this post directly? I've given you enough karma to do so. Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-13 01:57:58 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2017-06-13 01:55:52 -0500

gvdhoorn gravatar image

updated 2017-06-13 01:58:19 -0500

As is apparent from your view_frames output, you are not running any TF broadcaster.

RViz needs at least one TF authority in order to be able to transform incoming msgs such as pointclouds and other things that have a position in 3D space (ie: the visualiser window) into its scene graph properly.

You configure the root of the transformation tree that RViz is supposed to use with the Fixed Frame setting, which in your case if set to map. But without anyone publishing a transform from map to whatever frame_id is configured in the incoming msgs that is not going to work.

Two options:

  1. add a static_tf_publisher to your launch file that sets up a proper TF tree for all frames involved
  2. change the Fixed Frame setting to correspond to any of the frames that are used by any of the incoming msgs (just select the field and type the name of the frame in the textbox)

The proper approach would be 1, but to quickly visualise something, 2 would work.


Edit: and unless you actually want to do some robot localisation and / or map building, I would not bother with gmapping (or any of the related pkgs).

edit flag offensive delete link more

Comments

For option 1, how do I add a static_tf_publisher ?

P.S: If I do not use gmapping, I get No tf data. Actual error: Fixed Frame [map] does not exist . In this case, view_frames returns no tf data received

OneLeggedPirate gravatar image OneLeggedPirate  ( 2017-06-13 03:32:39 -0500 )edit

It would probably be good if you could provide us with a bit more context. Right now it's a unclear whether you are trying to create a static setup (ie: two webcams with a computer on your desk), or whether you are trying to configure a mobile robot base. The former doesn't need gmapping ..

gvdhoorn gravatar image gvdhoorn  ( 2017-06-13 04:30:24 -0500 )edit

.., for the latter it might make sense, but only if you're creating a map. Otherwise I'd use a localisation package.

But just to reiterate: gmapping is not a requirement for getting a TF tree setup.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-13 04:31:12 -0500 )edit

I'm just using a static setup at the moment.

OneLeggedPirate gravatar image OneLeggedPirate  ( 2017-06-13 04:59:11 -0500 )edit

Ok. Then adding a TF tree isn't that difficulty. No need for gmapping. Either create a urdf that describes how you've setup things (ie: relative position of the two cameras, etc), or take a look at wiki/tf - static_transform_publisher.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-14 05:04:20 -0500 )edit

I am also doing the same thing. I have 2 webcameras connected to my pc and later I want to mount them on a small rover which will navigate based on the disparity/depth map image. However I am stuck at tf broadcaster issue. Can you elaborate on how to solve the issue??@OneLeggedPirate

BotLover gravatar image BotLover  ( 2017-09-16 08:25:49 -0500 )edit

e.g. if your robot base tf is /base_link and your /camera_left_rect/point_cloud topic has frame_id:cam_left_ptcloud you need something like

rosrun tf static_transform_publisher 0.0 0.0 0.0 0 0 0 /base_link cam_left_ptcloud 100

; that static tf node then acts as the 'tf authority' .

Will Chamberlain gravatar image Will Chamberlain  ( 2018-03-26 21:38:42 -0500 )edit
1

answered 2023-01-28 07:00:21 -0500

bharath5673 gravatar image

these helped me

sudo apt install ros-humble-gazebo-ros
sudo apt-get install ros-humble-gazebo-msgs
sudo apt-get install ros-humble-gazebo-plugins
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-06-12 14:32:03 -0500

Seen: 45,656 times

Last updated: Jan 28 '23