25 #include "../include/katana/SimulatedKatana.h" 37 hold[0].duration = 0.0;
40 hold[0].splines[0].coef[0] = -3.022;
41 hold[0].splines[1].coef[0] = 2.163;
42 hold[0].splines[2].coef[0] = -2.207;
43 hold[0].splines[3].coef[0] = -2.026;
44 hold[0].splines[4].coef[0] = -2.990;
65 for (
size_t j = 0; j < traj[seg].splines.size(); j++)
67 double pos_t, vel_t, acc_t;
69 - traj[seg].start_time, pos_t, vel_t, acc_t);
87 static const double DURATION = 2.877065;
99 new_traj[0].duration = DURATION;
107 new_traj[0].splines[
GRIPPER_INDEX].target_position = openingAngle;
109 new_traj[0].splines[GRIPPER_INDEX].coef);
116 ROS_ERROR(
"moveJoint() not yet implemented for SimulatedKatana!");
static bool sleepUntil(const Time &end)
std::vector< double > motor_angles_
const size_t NUM_MOTORS
The number of motors in the katana (= all 5 "real" joints + the gripper)
virtual bool allMotorsReady()
std::vector< double > motor_velocities_
virtual bool someMotorCrashed()
virtual ~SimulatedKatana()
void getCubicSplineCoefficients(double start_pos, double start_vel, double end_pos, double end_vel, double time, std::vector< double > &coefficients)
std::vector< Segment > SpecifiedTrajectory
virtual bool allJointsReady()
boost::shared_ptr< SpecifiedTrajectory > current_trajectory_
virtual bool executeTrajectory(boost::shared_ptr< SpecifiedTrajectory > traj, boost::function< bool()> isPreemptRequested)
static const double GRIPPER_OPEN_ANGLE
Constants for gripper fully open or fully closed (should be equal to the value in the urdf descriptio...
void sampleSplineWithTimeBounds(const std::vector< double > &coefficients, double duration, double time, double &position, double &velocity, double &acceleration)
virtual bool moveJoint(int jointIndex, double turningAngle)
virtual void moveGripper(double openingAngle)
const size_t GRIPPER_INDEX
The motor index of the gripper (used in all vectors – e.g., motor_angles_)
virtual void refreshEncoders()
static const double GRIPPER_CLOSED_ANGLE
Constants for gripper fully open or fully closed (should be equal to the value in the urdf descriptio...