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

Not able to use frame_id from rosserial arduino in rviz

asked 2018-05-21 11:27:06 -0500

peteh gravatar image

updated 2018-05-26 14:55:34 -0500

I am publishing a LaserScan Message from a teensy3.2 to a Raspberry Pi 3 running Kinetic, the scan is published via USB and received by the Pi Node.

When attempting to visualize just the scan in RViz I don't get any results. I have changed global options -> fixed frame to laser_frame as instructed by the wiki. However I still receive "No tf data. Actual error: Fixed frame [laser_frame] does not exist.

/Laser_scan


header:
  seq: 13
  stamp:
    secs: 1455210523
    nsecs: 855981927
  frame_id: "laser_frame"
angle_min: 0.0
angle_max: 0.0
angle_increment: 0.0
time_increment: 0.0
scan_time: 0.0390000008047
range_min: 0.0500000007451
range_max: 1.20000004768
ranges: [0.12399999797344208, 0.12399999797344208, 0.12399999797344208, 0.12399999797344208, 0.12399999797344208, 0.12399999797344208, 0.12399999797344208, 0.12399999797344208, 0.12399999797344208, 0.12399999797344208]
intensities: []
When I run tf_monitor this is the result, no frames are shown.

$ rosrun tf tf_monitor
RESULTS: for all Frames
Frames:
All Broadcasters:
Any help would be appreciated I have been at this for sometime now, and to no avail.
EDIT: I believe the issue resides with ROS & RViz running on Windows Subsystem Linux (Ubuntu). the issue, I think I have pinpointed is RViz, and ROS not being able to read tf_frames, or frame_ids from a remote system (Raspberry Pi). On the master node I can run rostopic echo /tf_static and rostopic echo /laser_scan and see the Laser Message above and a transform being published. sample transform(Master Node):

transforms:

header:
  seq: 0
  stamp:
    secs: 1527363010
    nsecs: 747170163
  frame_id: "base_footprint"
child_frame_id: "base_link"
transform:
  translation:
    x: 0.0
    y: 0.0
    z: 0.017
  rotation:
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0

rosrun tf tf_monitor(Master Node):


RESULTS: for all Frames

Frames:
Frame: base_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0
Frame: front_wheel_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0
Frame: gyro_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0
Frame: left_cliff_sensor_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0
Frame: leftfront_cliff_sensor_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0
Frame: right_cliff_sensor_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0
Frame: rightfront_cliff_sensor_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0
Frame: wall_sensor_link published by unknown_publisher(static) Average Delay: 0 Max Delay: 0
on the remote node(Windows 10) I can run rostopic echo /tf_static and rostopic echo /laser_scan and see the Laser Message above and a transform being published. sample transform(Remote Node):

transforms:

header:
  seq: 0
  stamp:
    secs: 1527363010
    nsecs: 747170163
  frame_id: "base_footprint"
child_frame_id: "base_link"
transform:
  translation:
    x: 0.0
    y: 0.0
    z: 0.017
  rotation:
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0

rosrun tf tf_monitor(Remote Node):


RESULTS: for all Frames
Frames:
All Broadcasters:

I can ping both remote and master from each other, I can telnet between the two and receive messages. Both Master and Remote /etc/hosts list each.

Env variables are set to individual names, and to point at the master

Master Node ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-05-21 18:36:33 -0500

There are a few things here. Firstly there seems to be some information missing from the laser scan message:

angle_min: 0.0
angle_max: 0.0
angle_increment: 0.0

Without these values the ranges cannot be converted to cartesian points, so the scan cannot be shown.

The tf motor output is what we would expect, it is only concerned with the relationship between different frames, if you're only using one frame as you are then you don't need any transforms.

Finally, are you sure there isn't a typo (even an extra space at the end) of the RVIZ fixed frame. I can't see why you'd be getting a TF error if your scan frame_id is the same as the fixed frame.

Hope this helps.

edit flag offensive delete link more

Comments

I have corrected the angle_min, max, and increment to:


angle_min: 0.0 
angle_max: 3.14159
angle_increment: 0.0314159 

This has not corrected the issue with visualization, spelling was correct, and no extra characters added. Will update original question in the AM.

peteh gravatar image peteh  ( 2018-05-25 23:54:00 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-05-21 11:27:06 -0500

Seen: 310 times

Last updated: May 26 '18