From: Ioan S. <is...@gm...> - 2013-05-20 18:47:49
|
---------- Forwarded message ---------- From: Ioan Sucan <is...@gm...> Date: Mon, May 20, 2013 at 9:47 PM Subject: Re: [ompl-users] Planning with differential constraints To: Marcus Johansson <mar...@gm...> Hello Marcus, It sounds to me like you should actually define a StateSpace from scratch. Not use the SE3, R1 or Compound. The problem is that you are using a RealVectorStateSpace in a way that confuses various other components of OMPL -- I am not even sure what behvaiour you would get, depending on which functions you override. In fact, the reason the State representation is the way that is in OMPL is so that situations like yours can be handled nicely :) So I recommend implementing a state space from scratch, where you define StateType to be your own state, which inherits from base::State and contains one member: your object for forward propagation. Presumably you can extract a geometric state from that object, so you can do collision checking as well (if you care about that). Additionally, you should be careful about your StateSampler. I presume that causes the problems you currently have. You need to sample a state object that is reasonable in some fashion. The notion of a distance function should also be carefully defined. If you find the SE3 component useful, you can still construct a compound space by "adding" your newly defined state space to an SE3 one (thus forming a compound space). There is also a tutorial on how to add a new state space: http://ompl.kavrakilab.org/implementingStateSpaces.html Ioan On Mon, May 20, 2013 at 8:43 PM, Marcus Johansson < mar...@gm...> wrote: > Hi, > > I'm setting up a planning environment for planning with differential > constraints. I have access to a simulator that requires a specific data > object to be able to apply control values onto a geometric state to produce > the resulting geometric state using those controls for some time duration. > Therefore I have built my state space as such: > At the top there is a CompoundStateSpace containing an SE3StateSpace and a > RealVectorStateSpace(dim=1). The SE3StateSpace is the usual implementation > provided by ompl. The second state space has some functions overloaded, > namely: allocState(), copyState(), freeState(), equalStates() and > satisfiesBounds(). This state space is used for storing the data object > required by the simulator by casting the "double* values" member of the > RVSS so that it stores the data object. My control space is a 4-D > RealVectorControlSpace. > > My question is, when planning with RRT for example, how should I implement > the propagate function of the StatePropagator class? At the moment I've > implemented it like this: > void propagate(const State* _state, const *Control _control, const double > _duration, State* _result) > 1, read the special data object from _state. > 2, send it along with the control vector and the duration to the simulator > 3, store the new produced data object in _result > 4, copy the new produced data objects geometric parts to the SE3StateSpace > state of _result > > In conclusion, the SE3StateSpace part of _state is never used and the > propagation is thus interpreted to be used as merely a way to, using some > controls and time duration, go from one state in the state space to > another. In RRT, this would be used to randomly search for control values > that produces a state that lies closest to the randomly sampled one within > the applied control duration. Is this a wrong interpretation of propagate? > I'm not getting the intended behaviour out of the RRT planner with this > setup. > > Thanks! > > Best regards, > Marcus Johansson 'neckutrek' > > > > > > > > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > ompl-users mailing list > omp...@li... > https://lists.sourceforge.net/lists/listinfo/ompl-users > > |