30 #define STD_CHECK_PROCEDURE() \ 33 ROS_WARN("Manipulator still in motion, call stop first!"); \ 36 if (m_pRefVals != NULL) { \ 42 #define START_CTRL_JOB(info) \ 43 if ( m_cThread.startJob(m_pRefVals) == false ) { \ 44 m_ErrorMsg.assign("Internal Error: Unable to start movement, other control Job still active."); \ 109 for (
int i = 0; i <
m_DOF; i++)
116 for (
int i = 0; i <
m_DOF; i++)
132 for (
unsigned int i = 0; i<
m_vel_js.size(); i++)
138 for (
unsigned int i = 0; i<
m_acc_js.size(); i++)
157 if (pfad.points.size() == 2)
159 return moveThetas(pfad.points[1].positions, conf_current);
161 for(
unsigned int i = 0; i < pfad.points.front().positions.size(); i++ )
163 if((pfad.points.front().positions.at(i) - conf_current.at(i)) > 0.25)
165 ROS_ERROR(
"Cannot start trajectory motion, manipulator not in trajectory start position.");
175 for (
unsigned int i = 0; i<
m_vel_js.size(); i++)
181 for (
unsigned int i = 0; i<
m_acc_js.size(); i++)
253 for(
int i = 0; i <
m_DOF; i++)
255 len += (m_qsoll.at(i) - current_pos.at(i)) * (m_qsoll.at(i) - current_pos.at(i));
269 desired_vel.resize(m_DOF);
271 for(
int i = 0; i <
m_DOF; i++)
273 desired_vel.at(i) = m_vsoll.at(i) *
m_Vorsteuer + ( m_qsoll.at(i) - current_pos.at(i) ) *
m_P;
280 ROS_INFO(
"Probably finished trajectory");
282 desired_vel.resize(m_DOF);
283 for(
int i = 0; i <
m_DOF; i++)
285 desired_vel.at(i) = 0.0;
void SetPTPvel(double vel)
std::vector< double > last_q
bool step(std::vector< double > current_pos, std::vector< double > &desired_vel)
bool moveThetas(std::vector< double > conf_goal, std::vector< double > conf_current)
Will move the component to a goal configuration in Joint Space.
std::vector< double > m_vel_js
#define STD_CHECK_PROCEDURE()
std::vector< double > m_acc_js
void SetNow()
Makes time measurement.
bool moveTrajectory(trajectory_msgs::JointTrajectory pfad, std::vector< double > conf_current)
genericArmCtrl(int DOF, double PTPvel=0.7, double PTPacc=0.2, double maxError=0.7)
virtual double getTotalTime() const =0
std::vector< double > GetPTPacc() const
std::vector< double > last_q2
virtual std::vector< double > r_t(double t) const
std::vector< double > GetPTPvel() const
void SetPTPacc(double acc)
std::vector< double > last_q3
virtual std::vector< double > dr_dt(double t) const
std::vector< double > last_q1