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

Inounx's profile - activity

2021-08-02 05:24:41 -0500 received badge  Nice Question (source)
2019-06-10 04:42:05 -0500 commented answer How to improve the reliability of my robot's localization ?

@Lofti_Z Hi, I didn't use the ICP in the end, check the https://github.com/dejanpan/snap_map_icp package, it should give

2018-11-15 00:10:46 -0500 received badge  Good Answer (source)
2018-10-22 06:07:07 -0500 received badge  Nice Answer (source)
2018-07-04 06:58:06 -0500 commented answer How to synchronize two topics without message loss ?

Back then I worked around this problem by manually saving a laser scan and when receiving an AMCL pose, match with the l

2018-02-23 10:52:25 -0500 received badge  Enlightened (source)
2018-02-23 10:52:25 -0500 received badge  Good Answer (source)
2018-01-05 19:13:54 -0500 received badge  Nice Answer (source)
2017-07-10 04:26:35 -0500 commented question How to improve the reliability of my robot's localization ?

@adityakamath Hi, my email is in the package.xml in the archive you downloaded. @linusnie Hi, It is written in the fist

2017-06-20 22:50:53 -0500 received badge  Stellar Question (source)
2017-05-08 16:28:11 -0500 received badge  Necromancer (source)
2017-05-08 16:28:11 -0500 received badge  Self-Learner (source)
2017-05-05 03:40:04 -0500 received badge  Famous Question (source)
2017-05-05 03:38:43 -0500 received badge  Scholar (source)
2017-05-05 03:38:32 -0500 answered a question How to improve the reliability of my robot's localization ?

Here are the last modifications I did to improve this localization system, as I think it is not useful to let this post

2017-03-24 03:43:51 -0500 commented question Multiple callbacks in class. Node is randomly dying

Did you check that your "sizeof(msg)" returns the value you want ? it returns a size in bytes not the number of elements in array. It could lead to an out-of-bound access

2017-03-09 16:28:36 -0500 received badge  Notable Question (source)
2016-11-23 10:37:07 -0500 received badge  Popular Question (source)
2016-11-23 05:08:26 -0500 asked a question How to synchronize two topics without message loss ?

Hi all,

Context

Synchronizer

In order to assess the performance of AMCL, I am trying to synchronize two topics :

  • The estimated pose from AMCL output
  • The scan from the laser range

    /scan topic is published at 25Hz

    /localizer_pose topic is published at a variable frequency depending on the robot's movement (Max is about 3Hz).

The topics are not synchronized, as AMCL introduce a variable delay. As the /localizer_pose topic is published at a low frequency, I do not want to lose any pose message, or at worse very few.

I use a bagfile to replay the scenario to be able to compare different solutions. I also added a simple subscriber on the /localizer_pose topic, to get the total amount of pose received.

ROS Indigo, with Ubuntu Server 14.04.

Test1: Message filters, exact time

First test, add a TimeSynchronizer to see if an exact timestamp match could do the trick.

//Declarations
message_filters::Subscriber<sensor_msgs::LaserScan>* m_scanSubscriber;
message_filters::Subscriber<geometry_msgs::PoseWithCovarianceStamped>* m_localizerPoseMsgFilterSubscriber;
message_filters::TimeSynchronizer<geometry_msgs::PoseWithCovarianceStamped, sensor_msgs::LaserScan>* m_scanLocalizerPoseSynchronizer;

//Callbacks
void MyClass::localizerPoseCallback(const geometry_msgs::PoseWithCovarianceStampedConstPtr& pose)
{
    m_localizerPoseCount++;
}

void MyClass::localizerPoseWithScanCallback(const geometry_msgs::PoseWithCovarianceStampedConstPtr& pose, const sensor_msgs::LaserScan::ConstPtr& laserScan)
{
    m_localizerPoseWithScanCount++;
}

//Initialization
m_localizerPoseMsgFilterSubscriber = new message_filters::Subscriber<geometry_msgs::PoseWithCovarianceStamped>(m_nodeHandle, m_localizerPoseInputTopic, 5);
m_scanSubscriber = new message_filters::Subscriber<sensor_msgs::LaserScan>(m_nodeHandle, m_laserScanTopic, 50);

m_scanLocalizerPoseSynchronizer = new message_filters::TimeSynchronizer<geometry_msgs::PoseWithCovarianceStamped, sensor_msgs::LaserScan>(*m_localizerPoseMsgFilterSubscriber, *m_scanSubscriber, 10);
m_scanLocalizerPoseSynchronizer->registerCallback(boost::bind(&MyClass::localizerPoseWithScanCallback, this, _1, _2));

Results: I get 95 pairs for 203 poses, pretty bad, as expected.

Test2: Message filters, approximate time

That's the best candidate for now.

//Declarations
message_filters::Subscriber<sensor_msgs::LaserScan>* m_scanSubscriber;
message_filters::Subscriber<geometry_msgs::PoseWithCovarianceStamped>* m_localizerPoseMsgFilterSubscriber;
typedef message_filters::sync_policies::ApproximateTime<geometry_msgs::PoseWithCovarianceStamped, sensor_msgs::LaserScan> SyncScanWithLocalizerPose;
message_filters::Synchronizer<SyncScanWithLocalizerPose>* m_scanLocalizerPoseSynchronizer;

//Callbacks
void MyClass::localizerPoseCallback(const geometry_msgs::PoseWithCovarianceStampedConstPtr& pose)
{
    m_localizerPoseCount++;
}

void MyClass::localizerPoseWithScanCallback(const geometry_msgs::PoseWithCovarianceStampedConstPtr& pose, const sensor_msgs::LaserScan::ConstPtr& laserScan)
{
    m_localizerPoseWithScanCount++;
}

//Initialization
m_localizerPoseMsgFilterSubscriber = new message_filters::Subscriber<geometry_msgs::PoseWithCovarianceStamped>(m_nodeHandle, m_localizerPoseInputTopic, 5);
m_scanSubscriber = new message_filters::Subscriber<sensor_msgs::LaserScan>(m_nodeHandle, m_laserScanTopic, 50);

m_scanLocalizerPoseSynchronizer = new message_filters::Synchronizer<SyncScanWithLocalizerPose>(SyncScanWithLocalizerPose(10), *m_localizerPoseMsgFilterSubscriber, *m_scanSubscriber);
m_scanLocalizerPoseSynchronizer->registerCallback(&MyClass::localizerPoseWithScanCallback, this);

Results: Unfortunately, the results are not better: 95 pairs for 204 poses. Another run gave me 84 pairs for 194 total poses.

Test2: Tuning

I tried with AMCL tf_tolerance at 0 and at 0.1 (this is the default value), no difference.

I also tried to set the inter-message lower bound (parameter of ApproximateTime policy) to 0.02 (Half a period of laser scan) and to set the maximum interval duration (parameter of ApproximateTime policy) to 0.15 (maximum allowable time difference between pose and scan ?), but no difference.

So far, the approximate time didn't gave me good results, so I am wondering what I am doing wrong ? According to the documentation I would expect to not loose any pose message, and without doing too much parameter tuning.

Any thoughts ?

Thanks

2016-11-21 02:54:15 -0500 commented question Rviz running on Gazebo simulation issue.

Check the warning in "Global Status/ Fixed Frame" it seems that you do not publish the tranform from rgbd_camera_optical_frame to your base frame, It could explain why you cannot see anything. Are you using a transform publisher ?

2016-11-17 09:37:44 -0500 received badge  Great Question (source)
2016-11-17 07:06:00 -0500 commented question How to improve the reliability of my robot's localization ?

Yes exactly, what is displayed here is the output of the global ekf_localization node. I am trying to find a good way to display with rviz when amcl pose is fused, and when it's not (color change?), as the transition between the two is not always clear.

2016-11-17 04:55:20 -0500 edited question How to improve the reliability of my robot's localization ?

Context

I have a differential drive robot with 4 wheels, similar to the Clearpath Jackal. It moves in a closed environment in indoor and outdoor, and the map is known. It is equipped with a laser range, an IMU, and odometry is computed thanks to wheel encoders. The robot is also equipped with a GPS, but I would prefer not to use it for now.

Some area of the map (outdoor) are such that the robot walk through "weak" localization phases due too lack of landmarks. I am trying to improve the localization chain, to be more robust to these "weak" localization phases.

Basically what I am trying to do is to be able to navigate in a degraded mode whitout being completely lost (i.e. AMCL could be lost temporarily but tf map -> odom would still be available).

Setup

Setup

I use a first "local" robot_localization instance to fuse odom and imu data. This outputs what I called /odom/filtered. Next I have an AMCL instance, which takes as input laser range measurements and /odom/filtered. Then I fuse the AMCL position, odom and imu with a second "global" robot_localization instance. The first local ekf_localizer provides odom -> base_link transform The second global ekf_localizer provides map -> odom

The output of the first local ekf_localization is really good as I can see in rviz (The robot return to about 1m from it's departure point after a loop of 93m x 35m, cf image).

odom(blue) vs odom filtered(red)

odom(blue) vs odom filtered(red)

  • Os: Ubuntu Server 14.04 with ROS Indigo
  • Localization: robot_localization (v2.3.0) package with AMCL (v 1.12.13)
  • Visualization: To visualize the covariance of the position and odometry, the rviz_plugin_covariance is used.

AMCL Covariance problem

All this chain is based on the covariance of the respective measurements. So the covariance matrix values must be as representative of the reality as possible and it seems that's not the case.

At first I thought that the position covariance provided by AMCL was an estimation of how confident AMCL is on the current robot position in the map, but I am not sure. By displaying the covariance, I see that the robot localization is inside an ellipsoid about 20 to 30cm in diameter when it is well localized.

Note: For readability purpose, the displayed ellipsoid is 3sigma (estimated position +- 3 times the standard deviation)

Well Localized

When AMCL begin to get lost the covariance increase significantly,

Not well localized

and then decrease to, again, 20 to 30 cm in diameter, but with AMCL sometimes being really lost !

Lost

Why this strange behavior ? This causes the global ekf_localization to "trust" the position more than the odometry. In an attempt to workaround this behavior, I tried a naive approach : if the covariance ellipsoid is more than 50cm in diameter, I stop sending the AMCL position to the global ekf node. When the diameter is less than 50cm, I send the current estimated positon as initial position of AMCL. In some way it works well, but the reinitialization of AMCL is ... (more)

2016-11-17 04:00:12 -0500 commented answer How to improve the reliability of my robot's localization ?

Ok, it's much clearer now. With a few tests and a process noise covariance at 0.0001 in the diagonal values, I get pretty good results. I will update my post as soon as I have some nice screenshots.

2016-11-17 03:05:38 -0500 commented answer How to improve the reliability of my robot's localization ?

Thanks for your answer! If I understand correctly, what your are saying is that the process noise covariance Q is added during the state estimation process, so the values in this matrix must be choosen according to the frequency parameter ?

2016-11-16 23:17:40 -0500 received badge  Famous Question (source)
2016-11-16 10:28:09 -0500 received badge  Good Question (source)
2016-11-16 05:00:13 -0500 received badge  Favorite Question (source)
2016-11-16 02:21:10 -0500 received badge  Supporter (source)
2016-11-14 07:13:08 -0500 commented question How to improve the reliability of my robot's localization ?

I am using robot_state_publisher with an urdf model. The default parameters are used, so use_tf_static is false. I didn't heard about tf2 before, so yes I guess, I am using regular tf. I will look into it.

2016-11-14 07:10:46 -0500 received badge  Notable Question (source)
2016-11-14 06:37:45 -0500 commented question How to improve the reliability of my robot's localization ?

I have some warnings from both robot_localization nodes : Transform from imu to base_link was unavailable for the time requested. Using latest instead. I think it comes from the non-synchronization between /odom /imu_data and /amcl_pose, but maybe I am wrong ?

2016-11-14 03:27:51 -0500 commented question Need help with find error in this urdf

Concerning Xacro the package is ros-indigo-xacro

2016-11-14 03:26:34 -0500 received badge  Commentator
2016-11-14 03:26:34 -0500 commented question Need help with find error in this urdf

I have the same environment than yours (Ubuntu 14.04 / ROS Indigo) and to install Gazebo, I just installed the version provided with ROS. I currently have ros-indigo-gazebo-msgs ros-indigo-gazebo-plugins ros-indigo-gazebo-ros ros-indigo-gazebo-ros-control ros-indigo-gazebo-ros-pkgs installed.

2016-11-12 04:16:37 -0500 commented question Need help with find error in this urdf

You're welcome ;). I don't understand why you ask this, the version you have is not ok ?