On 10/26/2012 10:03 AM, Claudio Carbone wrote:
> I could not find a way to detach a Graphics2D object from the robot it's
> attached to.
> Meaning: the robot moves, the graphics move too.
> This is not what I need.
> I'm currently doing away with attaching the graphics2d to another robot,
> but this gives me a fixed offset I'd rather not have.
> Is there a proper way to deal with this or am I stuck with the manual
> offset compensation?
You can attach the graphics2d interface to the model that represents the
floorplan. For example, in simple.world, the floorplan is named "cave":
size [16.000 16.000 0.800]
pose [0 0 0 0]
You can specify that model in the Player config file to provide the
graphics 2d object:
# load the Stage plugin simulation driver
provides [ "simulation:0" ]
# load the named file into the simulator
# Create a Stage driver and attach position2d and laser interfaces
# to the model "r0"
provides [ "position2d:0" "ranger:0" "ranger:1" "graphics2d:1" ]