avidbots / flatland

A 2D robot simulator for ROS
BSD 3-Clause "New" or "Revised" License
104 stars 66 forks source link

Laserscan and Marker visualization don't agree #55

Open RGring opened 5 years ago

RGring commented 5 years ago

I have people (modeled with two circles for the legs) walking around. They follow a specified path. For that I apply velocities and position transformations to the models. As result, the marker visualization is doing what's expected, but the laser scan data isn't. The legs are registered at the right position, but not in the right orientation. It is always the initialized orientation ( 0° --> see image). If I remove the absolute transformations and just apply linear and angular transformations, the error remains. scan_marker_viz

josephduchesne commented 5 years ago

Are the bodies "awake"? You'll note that the tween plugin has to call

body_->physics_body_->SetAwake(true);

on the moving object in order to get Box2d to register movement.

If you already are, I can try to reproduce this as it might be a bug in flatland.

RGring commented 5 years ago

I had the density = 0. When setting it to a non-zero value, it works. You can easily reproduce it by spawning two robots and turning one. It results in the same effect.