Aggiustati include
This commit is contained in:
Binary file not shown.
@@ -9,10 +9,10 @@ Gamba::Gamba(rb::Vector3 pos, unsigned int* dataPos, std::string cosciaData, std
|
|||||||
const auto& caviglia = processor.getData();
|
const auto& caviglia = processor.getData();
|
||||||
|
|
||||||
pezzi.push_back(new Coscia(pos,2));
|
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(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
|
// modifico la rotazione relativa della gamba
|
||||||
sensori[0]->body.setRot({_Float16 (1.3),_Float16 (1.7),0});
|
sensori[0]->body.setRot({_Float16 (1.3),_Float16 (1.7),0});
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#ifndef CSV_H
|
||||||
|
#define CSV_H
|
||||||
|
|
||||||
#define DATA_PATH std::string("./../../data/")
|
#define DATA_PATH std::string("./../../data/")
|
||||||
|
|
||||||
class CSVProcessor {
|
class CSVProcessor {
|
||||||
@@ -20,3 +23,5 @@ public:
|
|||||||
const std::vector<std::vector<float>>& getData() const;
|
const std::vector<std::vector<float>>& getData() const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -7,3 +7,4 @@
|
|||||||
#include "pieces/headers/torso.hpp"
|
#include "pieces/headers/torso.hpp"
|
||||||
#include "joints/headers/rigid_joint.hpp"
|
#include "joints/headers/rigid_joint.hpp"
|
||||||
#include "joints/headers/pivot_joint.hpp"
|
#include "joints/headers/pivot_joint.hpp"
|
||||||
|
#include "collections/headers/gamba.hpp"
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
#include "joint_interface.hpp"
|
#include "joint_interface.hpp"
|
||||||
|
|
||||||
|
#ifndef PIVOTJ_H
|
||||||
|
#define PIVOTJ_H
|
||||||
|
|
||||||
class PivotJoint : public JointInterface {
|
class PivotJoint : public JointInterface {
|
||||||
protected:
|
protected:
|
||||||
void rotate(unsigned int id) override;
|
void rotate(unsigned int id) override;
|
||||||
@@ -26,3 +29,5 @@ class PivotJoint : public JointInterface {
|
|||||||
PivotJoint(PieceInterface* father,std::vector<PieceInterface*> childs, rb::Vector3 pivotPoint);
|
PivotJoint(PieceInterface* father,std::vector<PieceInterface*> childs, rb::Vector3 pivotPoint);
|
||||||
~PivotJoint();
|
~PivotJoint();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
#include "joint_interface.hpp"
|
#include "joint_interface.hpp"
|
||||||
|
|
||||||
|
#ifndef RIGIDJ_H
|
||||||
|
#define RIGIDJ_H
|
||||||
|
|
||||||
class RigidJoint : public JointInterface {
|
class RigidJoint : public JointInterface {
|
||||||
protected:
|
protected:
|
||||||
@@ -17,3 +19,5 @@ class RigidJoint : public JointInterface {
|
|||||||
RigidJoint(PieceInterface* father,std::vector<PieceInterface*> childs);
|
RigidJoint(PieceInterface* father,std::vector<PieceInterface*> childs);
|
||||||
~RigidJoint();
|
~RigidJoint();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -69,6 +69,8 @@ int main() {
|
|||||||
gs.joints.push_back(new RigidJoint(gs.pieces[3], {gs.pieces[2]}));
|
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");
|
printf("Ho costruito tutto!\n");
|
||||||
}
|
}
|
||||||
catch(char* e){
|
catch(char* e){
|
||||||
|
|||||||
Reference in New Issue
Block a user