Skip to content

Commit

Permalink
ControlBoard: first compiling version after the refactoring for intro…
Browse files Browse the repository at this point in the history
…ducting the coupling
  • Loading branch information
Nicogene committed Dec 12, 2024
1 parent 5755eb8 commit 27b52f9
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 131 deletions.
13 changes: 9 additions & 4 deletions plugins/controlboard/include/ControlBoard.hh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ private:
yarp::os::Network m_yarpNetwork;
yarp::os::Property m_pluginParameters;
gz::sim::EntityComponentManager* m_ecm;
yarp::sig::Vector m_physicalJointsPositionBuffer, m_physicalJointsVelocityBuffer,
m_physicalJointsTorqueBuffer;
yarp::sig::Vector m_actuatedAxesPositionBuffer, m_actuatedAxesVelocityBuffer,
m_actuatedAxesTorqueBuffer;

enum class AngleUnitEnum
{
Expand Down Expand Up @@ -92,15 +96,16 @@ private:
std::vector<yarp::dev::Pid>& yarpPIDs,
size_t numberOfPhysicalJoints);
void setJointPositionPIDs(AngleUnitEnum cUnits, const std::vector<yarp::dev::Pid>& yarpPIDs);
double convertUserGainToGazeboGain(JointProperties& joint, double value);
double convertGazeboGainToUserGain(JointProperties& joint, double value);
double convertGazeboToUser(JointProperties& joint, double value);
double convertUserToGazebo(JointProperties& joint, double value);
double convertUserGainToGazeboGain(PhysicalJointProperties& joint, double value);
double convertGazeboGainToUserGain(PhysicalJointProperties& joint, double value);
double convertGazeboToUser(PhysicalJointProperties& joint, double value);
double convertUserToGazebo(PhysicalJointProperties& joint, double value);
bool initializeJointPositionLimits(const gz::sim::EntityComponentManager& ecm);
bool initializeTrajectoryGenerators();
bool initializeTrajectoryGeneratorReferences(yarp::os::Bottle& trajectoryGeneratorsGroup);
bool parseInitialConfiguration(std::vector<double>& initialConfigurations);
void resetPositionsAndTrajectoryGenerators(gz::sim::EntityComponentManager& ecm);
void configureBuffers();
};

} // namespace gzyarp
4 changes: 2 additions & 2 deletions plugins/controlboard/include/ControlBoardData.hh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct CommonJointProperties {
double velocity{0.0}; // Joint velocity [deg/s]
double velocityLimitMin{std::numeric_limits<double>::min()};
double velocityLimitMax{std::numeric_limits<double>::max()};
}
};

struct PhysicalJointProperties
{
Expand Down Expand Up @@ -83,7 +83,7 @@ public:
// TODO (xela95): read this value from configuration file
std::chrono::milliseconds controlUpdatePeriod = std::chrono::milliseconds(1);

bool setInteractionMode((int axis, yarp::dev::InteractionModeEnum mode);
bool setInteractionMode(int axis, yarp::dev::InteractionModeEnum mode);
bool setControlMode(int j, int mode);
};

Expand Down
Loading

0 comments on commit 27b52f9

Please sign in to comment.