robotology / assistive-rehab

Assistive and Rehabilitative Robotics
https://robotology.github.io/assistive-rehab/doc/mkdocs/site
BSD 3-Clause "New" or "Revised" License
21 stars 11 forks source link

Actor not seen by lidar sensors #286

Closed vvasco closed 4 years ago

vvasco commented 4 years ago

The actor we use for the TUG demo in gazebo is not seen by lidar sensors. According to this, the problem is related to the fact that the ray plugin used to simulate the robot lasers works with Physics, while the actor with Rendering.

A possible solution could be using the ActorCollisionsPlugin which adds collisions to the actor, but the sensor will see boxes instead of the actor's actual shape. I need to check if the actor legs can be approximated as single boxes.

vvasco commented 4 years ago

The ActorCollisionsPlugin allows us to fit box shapes around the links defining the actor, with sizes that can be controlled in the .world file. The result is that the actor is successfully seen by the laser:

actor-collisions

However, a problem occurs with the parameter loop, which defines if the animations have to be repeated in loop. The ActorCollisionsPlugin works if loop is set to true (animations played in loop). Otherwise, when the animation stops, the box shapes start lifting up and thus the legs are not perceived anymore by the laser:

actor-loop

I'm not sure why this is happening, I asked it here on gazebo answers. Having loop to be true is something we want to avoid in the TUG demo (we want to have control on the animations).

vvasco commented 4 years ago

Opened a PR here.

vvasco commented 4 years ago

The PR is going forward. I just added a test to check the fixed functionality, as required.

vvasco commented 4 years ago

PR merged in gazebo11.