From: Sören J. <jen...@in...> - 2013-07-12 17:40:33
|
Hello OMPL-Users, I need to define a CompoundStateSpace with several StateSpaces but can't read/write certain subspaces appropriately. As an easy example take the following code: base::StateSpacePtr spaceRobot(new base::RealVectorStateSpace(2)); base::StateSpacePtr spaceObject1(new base::RealVectorStateSpace(2)); base::StateSpacePtr space = spaceRobot + spaceObject1; base::State* state = space->allocState(); For me the following questions came up: 1) How can I access both of the subspaces and define each values? "state->as<base::RealVectorStateSpace::StateType>()->values[0] = 0.1"? But how do I access the second subspace? The function "as" won't take any arguments. 2) As soon as I write something like "state->as<base::RealVectorStateSpace::StateType>()->values[0] = 0.1;" I can't print the state anymore. How did I corrupt the CompoundState? How can I then access the data or use the StateSpaces to print certain subspaces? I spend some hours dealing with these issues, also I did not find any helpful documentation online, so I consulted this mailing list. Thanks in advance for your help and keep up this good work! Greetings from Munich Sören Jentzsch |