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

transformation the laser scan data with robot pose matlab !!!! #134

Closed
fereydoon031 opened this issue Feb 19, 2018 · 4 comments
Closed

transformation the laser scan data with robot pose matlab !!!! #134

fereydoon031 opened this issue Feb 19, 2018 · 4 comments
Labels

Comments

@fereydoon031
Copy link

fereydoon031 commented Feb 19, 2018

hello guys, I want to simulate the bag data that I got from ROS in MATLAB. I separated the pose and range data from the bag file. and I wrote a script to plot the laser data and build a map (I assumed that my poses are correct). when I run my code, It works well, till the robot turns!. at that point, the scan data turns in the opposite direction! till the robot gets straight again. and again when the robot turns again I experience the same problem till the robot gets straight. I don't know whats wrong!!...the transformation I used works well except when the robot turn!!

(p.s : green points are scan data)

image

@kijongGil
Copy link
Contributor

Hi, :)
What do you use package to get the laser data?

@fereydoon031
Copy link
Author

@kijongGil
Hi, Thank you for your reply.
I just run SLAM with ROS and used "rosbag record -a" for recording the data, and then used the bag data in MATLAB with the following code:

a=rosbag('bag file name')
b=select(a, 'Time',[a.StartTime a.EndTime], 'Topic', '/scan');
c=readMessages(b);
(and for odometry i used \odom)
P.s--> timing between odometry and scan data was not the same so I catched the odometry data every five step and ignored the rest..

@kijongGil
Copy link
Contributor

I think that the frame_id of the scan data in rosbag file is "base_scan".
Could you make new rosbag file?
Change the frame_id from "base_scan" to "odom".
Refer to the link below,
http://emanual.robotis.com/docs/en/platform/turtlebot3/applications/#turtlebot-follower-demo

@routiful
Copy link

This issue will be closed since there were no actions for a while.
You can reopen this issue to show this issue to the users whenever.
Thanks. :)

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

No branches or pull requests

4 participants