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

Problems using Laser plugin #101

Open
viniciusalveshax opened this issue Sep 29, 2023 · 1 comment
Open

Problems using Laser plugin #101

viniciusalveshax opened this issue Sep 29, 2023 · 1 comment

Comments

@viniciusalveshax
Copy link

viniciusalveshax commented Sep 29, 2023

Hello. First I would like to thank you for the development of flatland. It's a very interesting project.

Unfortunately I am unable to use the Laser plugin.
The laser rays do not appear in the simulator and when I use it on the robot, even when I move it around the map (teleop via twist messages) the values of the scan topic never change. If I change the robot's initial position, the values change. It's as if the laser isn't moving with the robot after initializing on the map.

Any tips for beginners? I've read the site's documentation but haven't found anything that I could be doing wrong.

I am attaching my world and robot files (just renamed to .txt for upload purpose). Maybe it can help.
turtlebot2.model.yaml.txt
world.yaml.txt

Thanks in advance.

@josephduchesne
Copy link
Member

Hi,

Are you using ros1 or the ros2 branch?

The laser scan is not currently visualized in Flatland Viz, however if you launch rviz you should be able to see it if you set the "Fixed Frame" to "base" or "laser_front".

The TF tree is probably missing a map->base transform (I believe rviz defaults its fixed frame to map), so it can't plot the laser scan since it doesn't know where it is in the map.

You can fix this by either launching another node to publish map to base, or map->odom->base depending. An alternative (not recommended if you're also using ros navigation to drive the robot around the simulation) is using the model tf publisher plugin to publish map->base. This is normally the job of the localization system you're using, but if you're just trying to simulate moving the bot around in flatland, you can do this for now.

There are also more options in the diff drive plugin described here:

https://flatland-simulator.readthedocs.io/en/latest/included_plugins/diff_drive.html

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

2 participants