Skip to content
Snippets Groups Projects
Commit 23b5254c authored by acoromin's avatar acoromin
Browse files

Buf fixed that allocated too much memory for state vector

parent dd9a767b
No related branches found
No related tags found
No related merge requests found
...@@ -135,9 +135,9 @@ int main(int argc, char** argv) ...@@ -135,9 +135,9 @@ int main(int argc, char** argv)
string modelFileName; string modelFileName;
//model and initial view point //model and initial view point
modelFileName = "/home/jvallve/iri-lab/faramotics/models/campusNordUPC.obj"; //modelFileName = "/home/jvallve/iri-lab/faramotics/models/campusNordUPC.obj";
//modelFileName = "/home/acoromin/dev/br/faramotics/models/campusNordUPC.obj"; //modelFileName = "/home/acoromin/dev/br/faramotics/models/campusNordUPC.obj";
//modelFileName = "/home/andreu/dev/faramotics/models/campusNordUPC.obj"; modelFileName = "/home/andreu/dev/faramotics/models/campusNordUPC.obj";
devicePose.setPose(2,8,0.2,0,0,0); devicePose.setPose(2,8,0.2,0,0,0);
viewPoint.setPose(devicePose); viewPoint.setPose(devicePose);
viewPoint.moveForward(10); viewPoint.moveForward(10);
...@@ -176,7 +176,7 @@ int main(int argc, char** argv) ...@@ -176,7 +176,7 @@ int main(int argc, char** argv)
ground_truth.head(3) = pose_odom; ground_truth.head(3) = pose_odom;
odom_trajectory.head(3) = pose_odom; odom_trajectory.head(3) = pose_odom;
WolfManager* wolf_manager = new WolfManager(&odom_sensor, complex_angle, 1e9, pose_odom, 0.3, window_size); WolfManager* wolf_manager = new WolfManager(&odom_sensor, complex_angle, 1e6, pose_odom, 0.3, window_size);
//std::cout << "START TRAJECTORY..." << std::endl; //std::cout << "START TRAJECTORY..." << std::endl;
// START TRAJECTORY ============================================================================================ // START TRAJECTORY ============================================================================================
......
...@@ -318,9 +318,9 @@ int main(int argc, char** argv) ...@@ -318,9 +318,9 @@ int main(int argc, char** argv)
string modelFileName; string modelFileName;
//model and initial view point //model and initial view point
modelFileName = "/home/jvallve/iri-lab/faramotics/models/campusNordUPC.obj"; //modelFileName = "/home/jvallve/iri-lab/faramotics/models/campusNordUPC.obj";
//modelFileName = "/home/acoromin/dev/br/faramotics/models/campusNordUPC.obj"; //modelFileName = "/home/acoromin/dev/br/faramotics/models/campusNordUPC.obj";
//modelFileName = "/home/andreu/dev/faramotics/models/campusNordUPC.obj"; modelFileName = "/home/andreu/dev/faramotics/models/campusNordUPC.obj";
devicePose.setPose(2,8,0.2,0,0,0); devicePose.setPose(2,8,0.2,0,0,0);
//glut initialization //glut initialization
//glutInit(&argc, argv); //glutInit(&argc, argv);
......
...@@ -18,6 +18,12 @@ class NodeTerminus; ...@@ -18,6 +18,12 @@ class NodeTerminus;
#include "node_linked.h" #include "node_linked.h"
#include "map_base.h" #include "map_base.h"
// why v, w and a ?
// add descriptor as a StateBase -> Could be estimated or not. Aperture could be one case of "descriptor"that can be estimated or not
// orientation ? -> Is it also a descriptor ?
// init and end Time stamps
//
//class LandmarkBase //class LandmarkBase
class LandmarkBase : public NodeLinked<MapBase,NodeTerminus> class LandmarkBase : public NodeLinked<MapBase,NodeTerminus>
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
MapBase::MapBase() : MapBase::MapBase() :
NodeLinked(MID, "MAP") NodeLinked(MID, "MAP")
{ {
// std::cout << "MapBase::MapBase(): " << __LINE__ << std::endl;
} }
MapBase::~MapBase() MapBase::~MapBase()
......
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
//init static node counter //init static node counter
unsigned int NodeBase::node_id_count_ = 0; unsigned int NodeBase::node_id_count_ = 0;
NodeBase::NodeBase(std::string _label) : NodeBase::NodeBase(std::string _label, bool _verbose) :
label_(_label), // label_(_label),
node_id_(++node_id_count_), node_id_(++node_id_count_),
node_pending_(ADD_PENDING) node_pending_(ADD_PENDING),
verbose_(_verbose)
{ {
// std::cout << "NodeID::constructor. Id: " << node_id_ << std::endl; if (verbose_) std::cout << "NodeBase::NodeBase(). Id: " << node_id_ << " Label: " << label_ << std::endl;
} }
NodeBase::~NodeBase() NodeBase::~NodeBase()
......
...@@ -19,6 +19,7 @@ class NodeBase ...@@ -19,6 +19,7 @@ class NodeBase
unsigned int node_id_; ///< Node id. It is unique over the whole Wolf Tree unsigned int node_id_; ///< Node id. It is unique over the whole Wolf Tree
static unsigned int node_id_count_; ///< Object counter (acts as simple ID factory) static unsigned int node_id_count_; ///< Object counter (acts as simple ID factory)
PendingStatus node_pending_; ///< Pending to be added/updated in the filter or optimizer PendingStatus node_pending_; ///< Pending to be added/updated in the filter or optimizer
bool verbose_;
public: public:
...@@ -27,7 +28,7 @@ class NodeBase ...@@ -27,7 +28,7 @@ class NodeBase
* Constructor from label * Constructor from label
* *
*/ */
NodeBase(std::string _label); NodeBase(std::string _label, bool _verbose = false);
/** \brief Default destructor /** \brief Default destructor
* *
......
...@@ -11,8 +11,11 @@ WolfProblem::WolfProblem(unsigned int _size) : ...@@ -11,8 +11,11 @@ WolfProblem::WolfProblem(unsigned int _size) :
{ {
// map_ptr_ = new MapBase; // map_ptr_ = new MapBase;
// trajectory_ptr_ = new TrajectoryBase; // trajectory_ptr_ = new TrajectoryBase;
std::cout << "WolfProblem::WolfProblem(): " << __LINE__ << std::endl;
map_ptr_->linkToUpperNode( this ); map_ptr_->linkToUpperNode( this );
std::cout << "WolfProblem::WolfProblem(): " << __LINE__ << std::endl;
trajectory_ptr_->linkToUpperNode( this ); trajectory_ptr_->linkToUpperNode( this );
std::cout << "WolfProblem::WolfProblem(): " << __LINE__ << std::endl;
} }
WolfProblem::WolfProblem(TrajectoryBase* _trajectory_ptr, MapBase* _map_ptr, unsigned int _size) : WolfProblem::WolfProblem(TrajectoryBase* _trajectory_ptr, MapBase* _map_ptr, unsigned int _size) :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment