From: daniel c. <dan...@gm...> - 2012-05-10 19:26:22
|
Hi, I am implementing a new planner and my Graph structure is like this typedef boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS, boost::property < vertex_state_1_t, base::State*, boost::property < vertex_state_2_t, Eigen::Matrix3d, boost::property < vertex_state_3_t, std::vector<base::State* > > >, boost::property < boost::edge_weight_t, double, boost::property < boost::edge_index_t, unsigned int > > > Graph; typedef boost::graph_traits<Graph>::vertex_descriptor Vertex; boost::property_map<Graph, vertex_state_1_t>::type state1Property_; boost::property_map<Graph, vertex_state_3_t>::type state3Property_; void ompl::geometric::MyPlanner::freeMemory(void) { foreach (Vertex v, boost::vertices(g_)) { si_full->freeState(state1Property_[v]); for(unsigned int i=0; i<state3Property_[v].size(); i++) si_arm->freeState(state3Property_[v][i]); } g_.clear(); } void ompl::geometric::MyPlanner::clear(void) { Planner::clear(); freeMemory(); if (nn_) nn_->clear(); } When I run my planner then it crash, I don't know why. Is unallocating a graph property which has a property like std::vector<ompl::base::State*> is correct ?? (please see my freeMemory() function). Please let me know if I am doing anything wrong. Thanks, Daniel |