You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
I'm trying to add some functionalities to the PythonAPI, but I can't work out how to define API calls with more than one argument in PythonAPI/carla/source/libcarla/Actor.cpp.
Background info: I have created a class that derives from AActor and basically consists of named groups of light elements, which I want to be able to spawn and parameterize using the API. I can spawn, destroy, etc. the class, I also managed to write a function which empties a light group, i.e. deletes all respective light elements.
Extract from Actor.cpp:
.def("empty_light_group", &cc::LightRig::EmptyGroup, (arg("light_group_name"))) // works fine
I can't quite set up the function which takes in the name of the desired light group and the desired light intensity.
Extract from Actor.cpp:
.def("set_light_group_intensity", CALL_WITHOUT_GIL_2(cc::LightRig,SetGroupIntensity, std::string, float), (arg("light_group_name"), arg("intensity"))) // evokes a billion of boost errors
.def("set_light_group_intensity", CONST_CALL_WITHOUT_GIL_2(cc::LightRig,SetGroupIntensity, std::string, float), (arg("light_group_name"), arg("intensity"))) // evokes a billion of boost errors, too
.def("set_light_group_intensity", &cc::LightRig::SetGroupIntensity, (arg("light_group_name"), arg("intensity"))) // evokes a billion of boost errors as well
For clarity: of course I tried all three variants individually and not at once. ;) I receive C 2977 and C2955 errors, namely ""boost::mpl::list": Too many template arguments" and ""boost::mpl::list": use of class template requires template argument list".
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there,
I'm trying to add some functionalities to the PythonAPI, but I can't work out how to define API calls with more than one argument in PythonAPI/carla/source/libcarla/Actor.cpp.
Background info: I have created a class that derives from AActor and basically consists of named groups of light elements, which I want to be able to spawn and parameterize using the API. I can spawn, destroy, etc. the class, I also managed to write a function which empties a light group, i.e. deletes all respective light elements.
Extract from Actor.cpp:
I can't quite set up the function which takes in the name of the desired light group and the desired light intensity.
Extract from Actor.cpp:
For clarity: of course I tried all three variants individually and not at once. ;) I receive C 2977 and C2955 errors, namely ""boost::mpl::list": Too many template arguments" and ""boost::mpl::list": use of class template requires template argument list".
I'd really appreciate help with this.
Best regards
Robert
Beta Was this translation helpful? Give feedback.
All reactions