18 #ifndef __POWER_CUBE_CTRL_H_ 19 #define __POWER_CUBE_CTRL_H_ 21 #define VERSION_ELECTR3_FIRST 0x3518 22 #define VERSION_ELECTR2_LAST 0x3000 23 #define VERSION_ELECTR2_FIRST 0x2518 104 bool MoveVel(
const std::vector<double>& velocities);
251 bool getPositionAndStatus(
int module_id,
unsigned long* state,
unsigned char* dio,
float* position);
bool setHorizon(double horizon)
Sets the horizon (sec).
std::vector< double > getPositions()
Gets the current positions.
std::vector< double > m_accelerations
bool getJointVelocities(std::vector< double > &result)
get the current joint velocities (Rad/s)
std::vector< unsigned char > m_dios
std::string m_ErrorMessage
std::vector< double > m_positions
bool MoveVel(const std::vector< double > &velocities)
Moves all cubes by the given velocities.
std::vector< unsigned long > m_status
bool getStatus(PC_CTRL_STATUS &status, std::vector< std::string > &errorMessages)
Gets the status of the modules.
PC_CTRL_STATUS m_pc_status
bool setSyncMotion()
Configure powercubes to start all movements synchronously.
~PowerCubeCtrl()
Destructor.
std::vector< unsigned long > m_version
bool Init(PowerCubeCtrlParams *params)
Initializing.
bool getJointAngles(std::vector< double > &result)
get the current joint angles
bool setMaxAcceleration(double acceleration)
Sets the maximum angular velocity (rad/s) for the Joints, use with care!
bool Recover()
Recovery after emergency stop or power supply failure.
std::vector< double > getAccelerations()
Gets the current accelerations.
std::deque< std::vector< double > > m_cached_pos
std::vector< double > getVelocities()
Gets the current velcities.
ros::Time m_last_time_pub
PC_CTRL_STATUS getPC_Status() const
Get PC_Status message.
bool setMaxVelocity(double velocity)
Sets the maximum angular velocity (rad/s) for the Joints, use with care!
bool getPositionAndStatus(int module_id, unsigned long *state, unsigned char *dio, float *position)
bool isInitialized() const
Checking if is initialized.
void updateVelocities(std::vector< double > pos_temp, double delta_t)
bool statusMoving()
Returns true if any of the Joints are still moving.
std::vector< double > m_velocities
bool doHoming()
Waits until all Modules are homed.
bool updateStates()
Returns the state of all modules.
std::vector< std::string > m_ModuleTypes
PowerCubeCtrlParams * m_params
std::string getErrorMessage() const
Get error message.
bool Stop()
Stops the Manipulator immediately.
std::vector< unsigned long > getVersion()
Gets the firmware version of the modules.
bool setASyncMotion()
Configure powercubes to start all movements asynchronously.
PowerCubeCtrl(PowerCubeCtrlParams *params)
Constructor.
double getHorizon()
Gets the horizon (sec).
Parameters for cob_powercube_chain.
bool MoveJointSpaceSync(const std::vector< double > &angles)
Send position goals to powercubes, the final angles will be reached simultaneously.