Ask Your Question
0

Getting Transform Exception after implementing voxel layer

asked 2019-10-23 22:05:58 -0600

logan.ydid gravatar image

updated 2019-10-24 20:40:25 -0600

Hello friends,

I recently made the switch from a 2d costmap to a 2.5d voxel layer costmap based on suggestions from one of my previous posts. I decided to go with the spatio_temporal_voxel_layer plugin because it promised to have improvements over the standard voxel_grid plugin and it seemed to have a lot of documentation. After implementing and some troubleshooting i was able to get everything working and i am able to see the voxel grid in rviz. The issue i am having is that i am contunually getting the following errors:

[ERROR] [1571884523.045139138]: TF Exception for sensor frame: , cloud frame: camera_depth_optical_frame, Lookup would require extrapolation into the past.  Requested time 1571884512.575208000 but the earliest data is at time 1571884513.123332977, when looking up transform from frame [camera_depth_optical_frame] to frame [map]

[ERROR] [1571884524.605706427]: TF Exception for sensor frame: , cloud frame: camera_depth_optical_frame, Lookup would require extrapolation into the past.  Requested time 1571884513.871130000 but the earliest data is at time 1571884514.679229172, when looking up transform from frame [camera_depth_optical_frame] to frame [odom]

i thing this is effecting the function of the rest of the robot because then i place a navigation waypoint it takes a minute or two to do anything if at all.

results from rqt_tf_tree: image description costmap_common_params:

footprint: [[0.5,0.35],[0.5,-0.35],[-0.5,-0.35],[-0.5,0.35]]
raytrace_range: 3.0
obstacle_range: 2.5
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: camera_link, data_type: LaserScan, topic: scan, marking: true, clearing: true}

rgbd_obstacle_layer:
  enabled:               true
  voxel_decay:           30     #seconds if linear, e^n if exponential
  decay_model:           0      #0=linear, 1=exponential, -1=persistent
  voxel_size:            0.25   #meters
  track_unknown_space:   true   #default space is unknown
  observation_persistence: 0.0  #seconds
  max_obstacle_height:   2.0    #meters
  unknown_threshold:     15     #voxel height
  mark_threshold:        0      #voxel height
  update_footprint_enabled: true
  combination_method:    1      #1=max, 0=override
  obstacle_range:        6.0    #meters
  origin_z:              0.0    #meters
  publish_voxel_map:     true   # default off
  transform_tolerance:   0.2    # seconds
  mapping_mode:          false  # default off, saves map not for navigation
  map_save_duration:     60     #default 60s, how often to autosave
  observation_sources:   rgbd1_clear rgbd1_mark
  rgbd1_mark:
    data_type: PointCloud2
    topic: camera/depth/points
    marking: true
    clearing: false
    min_obstacle_height: 0.0     #default 0, meters
    max_obstacle_height: 1.0     #default 3, meters
    expected_update_rate: 0.0    #default 0, if not updating at this rate at least, remove from buffer
    observation_persistence: 0.0 #default 0, use all measurements taken during now-value, 0=latest 
    inf_is_valid: false          #default false, for laser scans
    clear_after_reading: true    #default false, clear the buffer after the layer gets readings from it
    voxel_filter: true           #default off, apply voxel filter to sensor, recommend on 
  rgbd1_clear:
    enabled: true                #default true, can be toggled on/off with associated service call
    data_type: PointCloud2
    topic: camera/depth/points
    marking: false
    clearing: true
    min_z: 0.1                   #default 0, meters
    max_z: 7.0                   #default 10, meters
    vertical_fov_angle: 0.7      #default 0.7, radians
    horizontal_fov_angle: 1.04   #default 1.04, radians
    decay_acceleration: 1.       #default 0, 1/s^2. If laser scanner MUST be 0
    model_type: 0                #default 0 (depth camera). Use 1 for 3D Lidar

global_params:

global_costmap:
  global_frame: map
  robot_base_frame: base_link ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2019-10-23 22:17:05 -0600

fergs gravatar image

So, looking at your first error message:

[ERROR] [1571884523.045139138]: TF Exception for sensor frame: , cloud frame: camera_depth_optical_frame, Lookup would require extrapolation into the past.  Requested time 1571884512.575208000 but the earliest data is at time 1571884513.123332977, when looking up transform from frame [camera_depth_optical_frame] to frame [map]

The timestamp on the message is 4523.04 - and it says the earliest data is 4513.12 -- this seems reasonable, you've got a 10 second buffer of TF data (which is the default).

So your real issue is that you are trying to transform a camera image from more than 10 seconds ago (4512.57). There are several possible causes:

  • Are you running the camera driver and navigation on the same computer? If not, make sure the clocks between the computers are synced (I'd suggest using chrony)
  • How bogged down is the CPU? A quick check of "top" or similar tool while things are running would give you an idea if your CPU can handle everything. If your load averages are really high, you not have enough processing power to actually process the messages before the TF buffer goes out.
  • It' is possible there is something funky going on with the camera driver or timing (although I'd rule out the first two things first) - can you see camera data in RVIZ or does it have TF issues too?
edit flag offensive delete link more

Comments

Im afraid you might be right about the CPU usage (see the image added to the post) I had a sneaking suspicion considering im using an old HP Mini 110 from like 7 years ago. Are there any ways that you know of, short of buying a new PC, that i may speed things up? like using a smaller map, bigger voxels, a headless version of ubuntu, etc?

logan.ydid gravatar imagelogan.ydid ( 2019-10-24 20:46:22 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-10-23 22:05:58 -0600

Seen: 16 times

Last updated: Oct 24