Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pose with wrong direction #20

Open
ivywongkk opened this issue Feb 24, 2019 · 5 comments
Open

Pose with wrong direction #20

ivywongkk opened this issue Feb 24, 2019 · 5 comments

Comments

@ivywongkk
Copy link

ivywongkk commented Feb 24, 2019

Hi there I'm using rf2o for the navigation stack. I rotated my lidar 90 degrees around z direction, and flipped upside down, and it scans only half range, from -180 to 0 degree.
There I got a problem: tf goes to mirrored direction( x axis)...i.e. when I move robot to right, the tf goes to left..
The tf setup seems to be correct because I run the same tf for hector slam to create a map, and no problem with the pose direction.
I'm new in ROS, could anyone advise how to solve it?

@CodesHub
Copy link

CodesHub commented Jul 27, 2019

I am having the same issue. I simply added the negative sign in LaserOdometry2D::PoseUpdate().
in file CLaserOdometry2D.cpp
Line 923:
pose_aux_2D.translation()(0) = -acu_trans(0,2);
pose_aux_2D.translation()(1) = -acu_trans(1,2);
Line 956:
lin_speed = -acu_trans(0,2) / time_inc_sec;
Then I get the right direction.

@ewerlopes
Copy link

Really helpful, thanks!

@amgaber95
Copy link

Hi, I have the same problem, but when tried to make this solution, the problem got worse, now the odom is calculated in the reverse direction

Can you please help me with this one.

@jacob-02
Copy link

jacob-02 commented Jul 2, 2024

The above solution works but could the repository developers let us know if this a proper solution or is there something we should know about the way the algorithm expects the scan data to solve this problem. @JGMonroy @jgoppert @famoreno @mertsaadet

@nourani
Copy link

nourani commented Jul 29, 2024

I have a similar problem, but might be different. During initialization the setLaserPoseFromTf() function is called and if everything is published properly with TF it should work. However, I noticed that occasionally it doesn't read the TF correctly, or if the node comes up before the TF publisher then this doesn't work. On line 101 (

setLaserPoseFromTf();
), the return argument is not checked and call it initialized (even though a retrieved = false; is returned.

Maybe for some, ensuring we keep trying to get the TF, would solve the problem!?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants