diff --git a/build/bin/mainV6.exe b/build/bin/mainV6.exe index 73b9944..441da19 100644 Binary files a/build/bin/mainV6.exe and b/build/bin/mainV6.exe differ diff --git a/src/collections/methods/gamba.cpp b/src/collections/methods/gamba.cpp index 970fc4a..460e77b 100644 --- a/src/collections/methods/gamba.cpp +++ b/src/collections/methods/gamba.cpp @@ -9,10 +9,10 @@ Gamba::Gamba(rb::Vector3 pos, unsigned int* dataPos, std::string cosciaData, std const auto& caviglia = processor.getData(); pezzi.push_back(new Coscia(pos,2)); - pezzi.push_back(new Caviglia(rb::Vector3{pos[0],pos[1],pos[3]+200},2)); + pezzi.push_back(new Caviglia(rb::Vector3{pos[0],pos[1],pos[2]+200},2)); sensori.push_back(new Sensore(pos,_Float16( 0.2 ),dataPos,coscia)); - sensori.push_back(new Sensore (rb::Vector3{pos[0],pos[1],pos[3]+200},_Float16( 0.2 ),dataPos,caviglia)); + sensori.push_back(new Sensore (rb::Vector3{pos[0],pos[1],pos[2]+200},_Float16( 0.2 ),dataPos,caviglia)); // modifico la rotazione relativa della gamba sensori[0]->body.setRot({_Float16 (1.3),_Float16 (1.7),0}); diff --git a/src/csv/headers/csv.hpp b/src/csv/headers/csv.hpp index 8b6f098..e71dabb 100644 --- a/src/csv/headers/csv.hpp +++ b/src/csv/headers/csv.hpp @@ -4,6 +4,9 @@ #include #include +#ifndef CSV_H +#define CSV_H + #define DATA_PATH std::string("./../../data/") class CSVProcessor { @@ -19,4 +22,6 @@ public: // Getter for data const std::vector>& getData() const; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/include.hpp b/src/include.hpp index 741e112..fddee8c 100644 --- a/src/include.hpp +++ b/src/include.hpp @@ -6,4 +6,5 @@ #include "pieces/headers/sensore.hpp" #include "pieces/headers/torso.hpp" #include "joints/headers/rigid_joint.hpp" -#include "joints/headers/pivot_joint.hpp" \ No newline at end of file +#include "joints/headers/pivot_joint.hpp" +#include "collections/headers/gamba.hpp" \ No newline at end of file diff --git a/src/joints/headers/pivot_joint.hpp b/src/joints/headers/pivot_joint.hpp index e6c5b5f..863b6ed 100644 --- a/src/joints/headers/pivot_joint.hpp +++ b/src/joints/headers/pivot_joint.hpp @@ -1,5 +1,8 @@ #include "joint_interface.hpp" +#ifndef PIVOTJ_H +#define PIVOTJ_H + class PivotJoint : public JointInterface { protected: void rotate(unsigned int id) override; @@ -25,4 +28,6 @@ class PivotJoint : public JointInterface { PivotJoint(PieceInterface* father,std::vector childs, rb::Vector3 pivotPoint); ~PivotJoint(); -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/joints/headers/rigid_joint.hpp b/src/joints/headers/rigid_joint.hpp index 0a69aae..e902a49 100644 --- a/src/joints/headers/rigid_joint.hpp +++ b/src/joints/headers/rigid_joint.hpp @@ -1,5 +1,7 @@ #include "joint_interface.hpp" +#ifndef RIGIDJ_H +#define RIGIDJ_H class RigidJoint : public JointInterface { protected: @@ -16,4 +18,6 @@ class RigidJoint : public JointInterface { RigidJoint(PieceInterface* father,std::vector childs); ~RigidJoint(); -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/testMain.cpp b/src/testMain.cpp index ea125c8..8e3c98f 100755 --- a/src/testMain.cpp +++ b/src/testMain.cpp @@ -69,6 +69,8 @@ int main() { gs.joints.push_back(new RigidJoint(gs.pieces[3], {gs.pieces[2]})); + //provo ad aggiungere una collection + Gamba g = Gamba({0,0,0},&pos,"coscia_filt.csv","coscia_filt.csv"); printf("Ho costruito tutto!\n"); } catch(char* e){