0
$\begingroup$

Rosanswers logo

Hy there,

i am trying to use the nav2d package with a real Husky but have problems with getting the costmap updated according to a lidar-measurement. The setup looks like: PC running ROS Kinetic connected over SSH to Husky. The Joystick is connected to the PC and the nav2d Operator runs on the PC. The husky is able to be moved, but he does just turn in the circle of the dark space of the map. All parameters are set to default, eccept the laser_frame is set to front_laser.

The following rqt_graph shows that the operator node successfully connects to the topic /scan/front which is correctly echoing data. image description

The result is the following in rviz: image description So no costmap updated according to the laser scan at all.

The operator node outputs following to the terminal:

[ INFO] [1553676062.818859498]: Using plugin "obstacle_layer"
[ INFO] [1553676063.385903322]:     Subscribed to Topics: scan
[ INFO] [1553676067.066342765]: Using plugin "inflation_layer"
[ WARN] [1553676072.713066832]: The scan observation buffer has not been updated for 7.25 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676072.913141790]: The scan observation buffer has not been updated for 7.45 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676073.112945804]: The scan observation buffer has not been updated for 7.65 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676073.312964877]: The scan observation buffer has not been updated for 7.85 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676073.513063737]: The scan observation buffer has not been updated for 8.05 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676073.712961420]: The scan observation buffer has not been updated for 8.25 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676073.913113372]: The scan observation buffer has not been updated for 8.45 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676074.113024278]: The scan observation buffer has not been updated for 8.65 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676074.313027468]: The scan observation buffer has not been updated for 8.85 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676074.512953558]: The scan observation buffer has not been updated for 9.05 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676074.713007869]: The scan observation buffer has not been updated for 9.25 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676074.913051751]: The scan observation buffer has not been updated for 9.45 seconds, and it should be updated every 0.40 seconds.
[ INFO] [1553676074.929597794]: Will publish desired direction on 'route' and control direction on 'desired'.
[ WARN] [1553676075.113030975]: The scan observation buffer has not been updated for 9.65 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676075.313082459]: The scan observation buffer has not been updated for 9.85 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676075.513005539]: The scan observation buffer has not been updated for 10.05 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676075.713003833]: The scan observation buffer has not been updated for 10.25 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676075.913045999]: The scan observation buffer has not been updated for 10.45 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676076.112947190]: The scan observation buffer has not been updated for 10.65 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676076.312953350]: The scan observation buffer has not been updated for 10.85 seconds, and it should be updated every 0.40 seconds.
[ WARN] [1553676076.513043371]: The scan observation buffer has not been updated for 11.05 seconds, and it should be updated every 0.40 seconds.
[ INFO] [1553676076.523762426]: Initializing LUT...
[ INFO] [1553676076.527955647]: ...done!
[ERROR] [1553676095.762639130]: Failed to send EXPLORE_COMMAND to Explore-Client.
[ WARN] [1553676113.829590261]: Costmap2DROS transform timeout. Current time: 1553676113.8295, global_pose stamp: 1553676113.5171, tolerance: 0.3000
[ WARN] [1553676113.829668037]: Could not get robot pose, cancelling reconfiguration
[ WARN] [1553676232.029594808]: Costmap2DROS transform timeout. Current time: 1553676232.0295, global_pose stamp: 1553676231.7018, tolerance: 0.3000
[ WARN] [1553676232.029655458]: Could not get robot pose, cancelling reconfiguration
[ WARN] [1553676233.029827406]: Costmap2DROS transform timeout. Current time: 1553676233.0298, global_pose stamp: 1553676232.7075, tolerance: 0.3000
[ WARN] [1553676233.029911408]: Could not get robot pose, cancelling reconfiguration
[ WARN] [1553676235.313028844]: Costmap2DROS transform timeout. Current time: 1553676235.3129, global_pose stamp: 1553676234.9735, tolerance: 0.3000

When trying the the mapper node, it does work, and the generated SLAM -map can be seen in rviz.

Would be very glad to get some hints, what the problem could be!

Thanks!


Originally posted by mtROS on ROS Answers with karma: 92 on 2019-03-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This is likely related to the height of the sensor being not within the min-max-height of the costmap. Please check the height of the sensor (important is the frame in TF, not the real robot actually) and the two values max_obstacle_height and min_obstacle_height of the observation source in costmap.yaml.


Originally posted by Sebastian Kasperski with karma: 1658 on 2019-03-27

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by mtROS on 2019-03-27:
Thank you for your answer! i set in coastmap.yaml

scan: {data_type: LaserScan, expected_update_rate: 0.4,
  observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 1.0, min_obstacle_height: 0.01}

and configured the laser_frame in the launch file to top_plate_link. The tf Position to the base_link( which was set to /Operator/local_map/robot_base_frame) is -1.4266; 0.05741; 0.245 (from rviz)

unfortunately no changes...

Comment by Sebastian Kasperski on 2019-03-27:
Can you validate via RViz that the laser points are really above the ground and not higher then 1m?

Comment by Sebastian Kasperski on 2019-03-27:
And your topic is called /scan/front, if I see it correctly. MAybe you also need to change the observation name to "scan/front".

Comment by mtROS on 2019-03-27:
The laser points are in rviz below the map surface.But the parameter laser_frame of the ros.yaml is set to a tf that is within min max.

Do you mean the parameter observation_source in the coastmap.yaml to be set to scan/front?

Comment by Sebastian Kasperski on 2019-03-27:
The laser points should be above the map, if they are below there is likely something wrong with the transformations. For testing you might set min_obstacle_height=-10 to see if it changes anything, but the real solution would be to fix the coordinate frame that holds the laser scan.

And yes, I mean observation_source. Remember that the same name has to be used in the next line when giving the detailed parameters for this source.

Comment by mtROS on 2019-03-27:
thank you for your help so far. I added a python node that subscribes to scan/front and publishes a new scan topic to a tf-frame that is above ground and for sure within the boundaries. The rqt_graph shows again that the subscriptions are right, but no changes to the costmap. The observation source is set correctly. Could it be that there are some problems with tf over SSH. i spotted that in the tf-tree that the most recent transform and oldest transform of the laser_frame is 0.0 so they are static.

Comment by mtROS on 2019-03-27:
yeeeeah! it is working now. The problem was that the observation_source was set to the right topic but then in the line below again just scan: was used.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.