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

Huibuh's profile - activity

2023-08-06 07:42:22 -0500 received badge  Guru (source)
2023-08-06 07:42:22 -0500 received badge  Great Answer (source)
2021-04-09 03:47:29 -0500 received badge  Nice Question (source)
2019-06-11 09:43:32 -0500 received badge  Famous Question (source)
2019-01-28 13:17:53 -0500 marked best answer Extrapolation error using hector_mapping + move_base

Hello all,

I have a problem with my robot setup which I cannot resolve, even after reading all relevant posts on here. I really would appreciate your help.

Problem Description

The system starts up not generating any errors (see https://dl.dropboxusercontent.com/u/10986309/2013-05-23_ros.answers/start_up_log.txt), producing an accurate map, and localization working well, too. As soon as I select a goal in rviz, move_base reproducibly throws the following errors:

[  ...]
[ERROR] [1369321339.784772926]: Extrapolation Error: Unable to lookup transform, cache is empty, when looking up transform from frame [/odom] to frame [/map]
[ERROR] [1369321339.785409391]: Global Frame: /odom Plan Frame size 107: /map
[ WARN] [1369321339.785726634]: Could not transform the global plan to the frame of the controller
[ERROR] [1369321340.434425166]: Extrapolation Error: Unable to lookup transform, cache is empty, when looking up transform from frame [/odom] to frame [/map]
[ERROR] [1369321340.434493357]: Global Frame: /odom Plan Frame size 107: /map
[ WARN] [1369321340.434528719]: Could not transform the global plan to the frame of the controller
[  ...]

However, if I make the following change in the local_costmap_params.yaml file:

local_costmap: global_frame: /odom

to

local_costmap: global_frame: /map

I don't get any errors and move_base generates a plan to the goal, which is also displayed in rviz. Unfortunately, the generated cmd_vel commands are very shaky, oscillate and weird navigation behaviour is the result.

My Setup

  • Robot: Custom robot with chain drive, i.e. non-holonomic. I have written a base_controller node for it which sends drive commands to the motors and uses the encoder information to calculate odometry and publish as tf+nav_msg (as described http:// www.ros.org/wiki/navigation/Tutorials/RobotSetup/Odom). I have also created a *.urdf file and use robot_state_publisher to publish the tf's for the model.
  • Sensors: Hokuyo UTM-30LX laser scanner
  • Nodes: max_driver (custom base_controller), hector_mapping, move_base, hokuyo_node
  • hector_mapping config:

[hector_config.launch] https:// dl.dropboxusercontent.com/u/10986309/2013-05-23_ros.answers/hector_config.launch

  • move_base config:

[move_base_config.launch] https:// dl.dropboxusercontent.com/u/10986309/2013-05-23_ros.answers/move_base_config.launch

[base_local_planner_params.yaml] https:// dl.dropboxusercontent.com/u/10986309/2013-05-23_ros.answers/base_local_planner_params.yaml

[costmap_common_params.yaml] https:// dl.dropboxusercontent.com/u/10986309/2013-05-23_ros.answers/costmap_common_params.yaml

[global_costmap_params.yaml] https:// dl.dropboxusercontent.com/u/10986309/2013-05-23_ros.answers/global_costmap_params.yaml

[local_costmap_params.yaml] https://dl.dropboxusercontent.com/u/10986309/2013-05-23_ros.answers/local_costmap_params.yaml

  • Remote nodes: The hokuyo_node and the base_controller node run on an embedded PC, which is connected via ethernet to a powerful laptop running the remaining nodes. The time of both machines is synced via crony.
  • SW-Version: Ubuntu 12.04 + ROS Groovy, everything up to date

Debug Info

  • tf tree: [link] (https:// dl.dropboxusercontent.com/u/10986309/2013-05-23_ros.answers/frames.pdf)
  • tf_monitor output:
ros@Base:~$ rosrun tf tf_monitor
RESULTS: for all Frames

Frames:
Frame: /base_frame published by /max_driver Average Delay: -0.00377412 Max Delay: 0
Frame: /base_laser published by /robot_state_publisher Average Delay: -0.476582 Max Delay: 0
Frame: /base_laser_cap published by /robot_state_publisher Average Delay: -0.476592 Max Delay: 0
Frame: /base_laser_mount_box published by /robot_state_publisher Average Delay: -0.476591 Max Delay: 0 ...
(more)
2018-10-23 17:29:45 -0500 marked best answer robot_localization: yaw angle jumping erratically

Hello Tom/All,

I am currently using robot_pose_ekf to fuse wheel odometry and imu data on a custom robot with two tracks. This is wokring pretty well (works perfectly with gmapping and the navigation stack). I am now in the process of adding GPS into the mix, which would allow me to do some outdoor navigation experiments.

As adding GPS as sensor source is not officially supported by robot_pose_ekf, so I was on the lookout for an alternative solution. On paper, I found that robot_localization is exactly what is was looking for. Unfortunately, I am facing issues getting it to work.

My Setup

  1. odom0 is coming from by custom base_controller on topic /wheel_odom as nav_msgs/Odometry. It provides the following data: x, y, yaw, x velocity, yaw velocity. All remaining fields included in nav_msgs/Odometry are 0's.
  2. odom1 is coming from a gps_common/utm_dodmetry_node as nav_msgs/Odometry. It provides the following data: x, y and z. All remaining fields included in nav_msgs/Odometry are 0's.
  3. imu0 is coming from a XSens IMU (lse_xses_mti driver) on topic /imu_data as sensor_msgs/Imu. It provides the following data: roll, pitch and yaw angles. All remaining fields of sensor_msgs/Imu are 0's.

For now, the robot is meant to operate on the plane only. Hence, we can deduce that z is always 0, and so are the roll and pitch angles. My launch file below takes that into account.

My robot_localization launch file

<launch>  
  <!-- Launch robot_localization node -->
  <node pkg="robot_localization" type="ekf_localization_node" name="robot_localization" >
    <remap from="set_pose" to="/robot_localization/set_pose"/>           
    <remap from="odometry/filtered" to="/robot_localization/odom_combined"/>

    <param name="odom_frame" value="odom_combined"/>
    <param name="base_link_frame" value="base_footprint"/>    

    <!-- =============================================================================== -->    
    <!-- Configure odom0 (WHEEL_ODOM) -->
    <param name="odom0" value="/wheel_odom" />
    <rosparam param="odom0_config">[true,  true,  false,    <!-- x, y, z position -->
                                    false, false, true,    <!-- roll, pitch, yaw angles-->
                                    true,  true,  false,   <!-- x/y/z velocity -->
                                    false, false, true]    <!-- roll/pitch/yaw velocity -->
    </rosparam>
    <rosparam param="odom0_differential">[false,  false,  false,   <!-- x, y, z position -->
                                          false,  false,  false]   <!-- roll, pitch, yaw angles-->
    </rosparam>    
    <!-- =============================================================================== -->    
    <!-- Configure odom1 (GPS_ODOM) -->
    <param name="odom1" value="/utm_odometry_node/gps_odom"/>
    <rosparam param="odom1_config">[true,  true,  false,      <!-- x, y, z position -->
                                    false, false, false,   <!-- roll, pitch, yaw angles-->
                                    false, false, false,   <!-- x/y/z velocity -->
                                    false, false, false]   <!-- roll/pitch/yaw velocity -->
    </rosparam>
    <rosparam param="odom1_differential">[false, false, false,  <!-- x, y, z position -->
                                          false, false, false]  <!-- roll, pitch, yaw angles-->
    </rosparam>
    <!-- =============================================================================== -->    
    <!-- Configure imu0 (XSENS)-->
    <param name="imu0" value="/imu_data"/>               
    <rosparam param="imu0_config">[false, false, false,  <!-- x, y, z position -->
                                   false, false, true,   <!-- roll, pitch, yaw angles-->
                                   false, false, false,  <!-- x/y/z velocity -->
                                   false, false, false]  <!-- roll/pitch/yaw velocity -->
    </rosparam>
    <rosparam param="imu0_differential">[false, false, false,   <!-- x, y, z position -->
                                         false, false, false]   <!-- roll, pitch, yaw angles -->
    </rosparam>
    <!-- =============================================================================== -->    
  </node>

</launch>

The Issue

The problem is that the yaw angle of /robot_localization/odom_combined is jumping erratically as long as data is coming in on the /imu_data topic. (yaw on /imu_data is rock solid however).

When I disable the yaw-angle-component of odom0 (/wheel_odom), the problem disappears. I have also ... (more)

2018-09-19 13:36:18 -0500 marked best answer Navigate using hector_slam

Hello,

Using my custom robot base, I can successfully perform autonomous navigation using either [amcl/map_server/move_base] or [gmapping/move_base]. However, I really would like to use hector_mapping for SLAM, as it seems to perform much better (less CPU, better localization). I tried two approaches, but none led to success:

OPTION 1: Use hector_mapping/move_base

This fails with the follwing error message thrown by move_base:

[ERROR] [1384155009.792804637]: Extrapolation Error: Lookup would require extrapolation into the future.  Requested time 1384155009.754343262 but the latest data is at time 1384155009.733661973, when looking up transform from frame [odom] to frame [map]

Looking at the output of rosrun tf tf_monitor, I can see the following differences between the published tf's:

hector_mapping providing /map -> /odom transform:

rosrun tf tf_monitor
Frame: odom published by /hector_mapping Average Delay: 0.0486663 Max Delay: 0.0770144

amcl providing /map -> /odom transform:

rosrun tf tf_monitor
Frame: odom published by /amcl Average Delay: -0.0532177 Max Delay: 0

This completely makes sense, as the amcl documentation states here:

The published transforms are future dated.

This explains why move_base throws the extrapolation error. The question is: How to fix it? Of course, I could add 0.1s to the tf time stamp generated by hector_mapping in the source, but then I won't get future package updates, which is not ideal. Any better suggestions how to make hector_mapping compatible with move_base?

Option 2: Use hecor_navigation package

Unfortunately, there is no documentation available for this package. As hecor_navigation only available from source, I downloaded it from here into my rosbuild workspace (package is not catkinized) and ran rosmake to compile it. This produced the following error:

[rospack] Error: package/stack 'hector_elevation_visualization' depends on non-existent package 'common_rosdeps' and rosdep claims that it is not a system dependency. Check the ROS_PACKAGE_PATH or try calling 'rosdep update'

@Stefan: Is hecor_navigation still being maintained, or is there a successor package that is compatible with Groovy or Hydro?

Thanks, Heiko

2018-09-11 05:23:21 -0500 received badge  Notable Question (source)
2018-09-11 05:23:21 -0500 received badge  Popular Question (source)
2018-08-30 13:34:07 -0500 received badge  Great Answer (source)
2018-08-30 13:34:07 -0500 received badge  Guru (source)
2018-05-25 02:43:04 -0500 edited question Remote machine topic listed, but no data transmitted

Remote machine topic listed, but no data transmitted Dear all, I ran into a problem which I don't know how to solve. I h

2018-05-25 02:42:08 -0500 commented question Remote machine topic listed, but no data transmitted

Thanks gdvhoorn. The hostnames resolve due entries in /etc/hosts on both machines. I have not tried setting ROS_IP. I wi

2018-05-25 02:19:29 -0500 asked a question Remote machine topic listed, but no data transmitted

Remote machine topic listed, but no data transmitted Dear all, I ran into a problem which I don't know how to solve. I h

2017-10-13 03:15:54 -0500 received badge  Great Question (source)
2017-09-15 02:24:01 -0500 received badge  Good Answer (source)
2017-09-13 01:10:15 -0500 received badge  Nice Answer (source)
2017-05-17 03:10:30 -0500 received badge  Famous Question (source)
2017-04-20 16:54:15 -0500 marked best answer Ground filter package for tilt laser that works under Hydro?

Hello All,

I am using the laser_assembler package to generate a point cloud from the scans of a tilting Hokuyo laser scanner. However, I am struggeling to find an existing ROS package to filter out the reflections of the ground plane that is available/compiles under ROS Hydro on Ubuntu 13.04.

I am aware that there are several established means of accomplishing this task. Unfortunately, none of the ones I came across seems to work under Hydro. This is what I have been looking at:

laser_filters is available on Hydro, but does not come with a ground filter plugin by default. Does anyone know of a ground filter plugin that works on Hydro?

The latest version of pr2_navigation_perception is for Groovy only and has not been migrated to Hydro. It uses the semantic_point_annotator, the launch file is ground_plane.xml. So far, I have successfully catkinized it but failed to compile it due to pcl header issues

ua-ros-pkg is also outdated (rosbuild/Groovy). I catkinzed it, but also no luck after several hours of trying to get it compile on hydro.

Another related post can be found here.

As this is such a common task, I am reaching out to the community hoping that there is a solution out there.

Thanks!

2017-04-12 19:59:25 -0500 received badge  Famous Question (source)
2017-03-02 06:22:22 -0500 received badge  Notable Question (source)
2017-02-24 00:42:58 -0500 received badge  Notable Question (source)
2017-02-23 08:39:25 -0500 received badge  Popular Question (source)
2017-02-23 08:38:07 -0500 commented answer StaticLayer map-resize erases all obstacles from ObstacleLayer

You're right, each time StaticLayer::incomingMap() is executed, Costmap2D::resizeMap() is called on all other layers. In this function, initMaps() and resetMaps() wipes the existing data. Do you have any suggestions how to modify Costmap2D::resizeMap() to preserve the data?

2017-02-23 08:16:16 -0500 commented question Dynamic footprint support

Changed the original question, see above.

2017-02-13 02:22:01 -0500 received badge  Popular Question (source)
2017-02-09 08:12:33 -0500 asked a question Dynamic footprint support

Hello @David Lu

My robot runs on four tracks whose angle can be adjusted during runtime. To account for the change of the robots' footprint, I use the dynamic recunfigure callback mechanism by calling the /move_base/global_costmap/set_parameters and /move_base/local_costmap/set_parameters services, passing a new footprint string.

My problem is that each footprint change while move_base navigation is active causes the costmap of the obstacle layer to be reset, i.e. all obstacles that so far have been detected are deleted and the costmap is re-initialized empty.

Edit: Removed part of the original question text as I discovered that parameter footprint_clearing_enabled has nothing to do with the observed behavior.

As I discovered myself by now, the reason for the observed behavior is that by using the dynamic reconfigure mechanism to adjust the footprint during runtime is that the callback Costmap2DROS::reconfigureCB() each time it is executed first deletes and then re-instantiates the mapUpdateLoop thread:

map_update_thread_->join();
delete map_update_thread_;
...
map_update_thread_ = new boost::thread(boost::bind(&Costmap2DROS::mapUpdateLoop, this, map_update_frequency));

Hence, the content of each layer is reset. The solution I have come up with is to add a DynamicFootprint service to Costmap2DROS, that only updates the footprint:

bool Costmap2DROS::cbDynamicFootprint(DynamicFootprint::Request &req, DynamicFootprint::Response &res)
{
  if (req.footprint_str != "")
  {
    std::vector<geometry_msgs::Point> new_footprint;
    if (makeFootprintFromString(req.footprint_str, new_footprint))
        setUnpaddedRobotFootprint(new_footprint);
    else
        ROS_ERROR("Invalid footprint string from dynamic reconfigure");
  }    
  return true;
}

This seems to be working, and allows me to adjust the robot footprint during runtime without loosing the costmap data. Do you have a better idea? Is it worth creating a pull request so others can benefit form this change, too?

Regards, Heiko

2017-02-09 07:18:12 -0500 asked a question StaticLayer map-resize erases all obstacles from ObstacleLayer

Hello @David Lu

I am using Google Cartographer as SLAM component, and move_base for navigation. In the config of the global costmap, I have setup costmap_2d::StaticLayer to subscribe to the /map topic published by cartographer. There is also an ObstacleLayer and an InflationLayer. My problem is that each time cartographer dynamically adjusts the map size, all obstacles which have been added to the global costmap get erased.

Looking at the code of static_layer.cpp I can see that StaticLayer::incomingMap() is executed when a map with new dimensions is received. In this function, there is a section that initializes the costmap with static data.

How can I prevent the StaticLayer from erasing previously discovered obstacles from the ObstacleLayer to get erased from the master costmap (i.e. global costmap)?

Thanks

2017-02-07 09:18:07 -0500 marked best answer Path to resource files in C++ node

Hello fellow developers,

I have trouble determining the path to a folder containing resource files in a self written C++ catkin package. I am using the following macro in CMakeLists.txt to export the resource files (a couple of .xml files btw.):

install(DIRECTORY resources
        DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

This creates the following "resources" folder:

home/ros/catkin_ws/install/share/opencv_ros_node/resources/

I need to access the resource files in my source code here:

string cascade_path = "/home/ros/catkin_ws/src/opencv_ros_node/src/resources/haarcascade.xml";
haar_cascade.load( cascade_path );

Obviously, I do not want to use a hardcoded absolute path. But how can I determine the correct relative path to the resource folder during run time? (Ideally, this should also work if 'catkin_make install' has not been run explicitly)

Any help is appreciated.

Cheers, Heiko

2017-01-19 15:23:43 -0500 received badge  Good Question (source)
2016-12-21 01:22:19 -0500 received badge  Good Question (source)
2016-07-11 09:10:32 -0500 commented answer Create an RViz dockable panel w/ catkin and Qt5

Your comment "If some errors remain, it might be because automoc is not perfect. It then helps to just add the header file to the sources list" saved my day. After battling with this error for hours, this finally worked. Cheers!

2016-07-09 17:15:07 -0500 received badge  Good Answer (source)
2016-07-09 17:15:07 -0500 received badge  Enlightened (source)
2016-07-06 07:32:41 -0500 commented answer kinetic : rviz segfaults when loading panel

I ran into the exact same problem and your explanation and provided links worked perfectly. I just upvoted your answer, thanks a bunch William!