23 : control_cycle_sec_(0.008),
84 std_msgs::String str_msg;
85 str_msg.data =
"gripper_module";
127 Eigen::MatrixXd tra =
129 tar_value , 0.0 , 0.0 ,
143 Eigen::MatrixXd tra =
145 tar_value , 0.0 , 0.0 ,
154 ROS_INFO(
"[start] send trajectory");
159 robotis_controller_msgs::SyncWriteItem sync_write_msg;
160 sync_write_msg.item_name =
"goal_torque";
167 sync_write_msg.joint_name.push_back(joint_name);
168 sync_write_msg.value.push_back(torque_limit);
181 publishStatusMsg(robotis_controller_msgs::StatusMsg::STATUS_INFO,
"End Trajectory");
193 std::map<std::string, double> sensors)
199 for (std::map<std::string, robotis_framework::DynamixelState *>::iterator state_iter =
result_.begin();
200 state_iter !=
result_.end(); state_iter++)
202 std::string joint_name = state_iter->first;
205 std::map<std::string, robotis_framework::Dynamixel*>::iterator dxl_it = dxls.find(joint_name);
206 if (dxl_it != dxls.end())
207 dxl = dxl_it->second;
222 publishStatusMsg(robotis_controller_msgs::StatusMsg::STATUS_INFO,
"Start Trajectory");
232 for (std::map<std::string, robotis_framework::DynamixelState *>::iterator state_iter =
result_.begin();
233 state_iter !=
result_.end(); state_iter++)
235 std::string joint_name = state_iter->first;
257 robotis_controller_msgs::StatusMsg status_msg;
259 status_msg.type = type;
260 status_msg.module_name =
"Gripper";
261 status_msg.status_msg = msg;
double control_cycle_sec_
Eigen::MatrixXd goal_joint_tra_
std::map< std::string, DynamixelState * > result_
Eigen::MatrixXd calcMinimumJerkTra(double pos_start, double vel_start, double accel_start, double pos_end, double vel_end, double accel_end, double smp_time, double mov_time)
void publish(const boost::shared_ptr< M > &message) const
ros::Publisher movement_done_pub_
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
std_msgs::String movement_done_msg_
boost::thread * tra_gene_tread_
ControlMode control_mode_
Eigen::VectorXd present_joint_position_
sensor_msgs::JointState goal_joint_pose_msg_
Eigen::VectorXd present_joint_velocity_
void setCallbackQueue(CallbackQueueInterface *queue)
void traGeneProcJointSpace()
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
ros::Publisher status_msg_pub_
void setModeMsgCallback(const std_msgs::String::ConstPtr &msg)
#define NUM_GRIPPER_JOINTS
Eigen::VectorXd goal_joint_position_
DynamixelState * dxl_state_
ros::Publisher goal_torque_limit_pub_
ros::Publisher set_ctrl_module_pub_
void setJointPoseMsgCallback(const sensor_msgs::JointState::ConstPtr &msg)
void initialize(const int control_cycle_msec, robotis_framework::Robot *robot)
void publishStatusMsg(unsigned int type, std::string msg)
void process(std::map< std::string, robotis_framework::Dynamixel * > dxls, std::map< std::string, double > sensors)
std::map< std::string, int > joint_name_to_id_
boost::thread queue_thread_