I am trying to use "playerc_simulation_set_property" to change the color of
a model in a Stage simulation at runtime. This is what I am trying to do:
#! /usr/bin/env python
from playerc import *
client = playerc_client(None, "localhost", 6665)
sim = playerc_simulation(client, 0)
sim.set_pose2d("robot", 10.0, 10.0, 0.0) # this works fine
sim.set_property("robot", "_mp_color", [255, 0, 0, 0]) # this doesn't work
I haven't been able to find out how to call the simulation class's
"set_property()" method from Python. In the C interface, it has four
(1) the name of the model of which we want to set a property
(2) the name of the property to set
(3) a (void*) the new value of the property
(4) the number of war bytes that make up the new value.
I am unable to find a way to specify the third and fourth parameters that is
accepted by the Swig-generated interface, and I am starting to wonder if it
can be done at all.
If anyone knows how this can be done, it would be greatly appreciated.
Get latest updates about Open Source Projects, Conferences and News.