Closed yijiangh closed 7 years ago
save user-defined reset pose in framefab_core.
Then design a message for general joint to joint planning (with immediate execution), computed in framefab_process_planning
std::vector framefab_process_planning::getCurrentJointState(const std::string& topic) { sensor_msgs::JointStateConstPtr state = ros::topic::waitForMessage( topic, ros::Duration(DEFAULT_JOINT_WAIT_TIME)); if (!state) throw std::runtime_error("Joint state message capture failed"); return state->position; }
// // step 5: immediate execution (a quick solution for debugging) // ros::NodeHandle nh; // actionlib::SimpleActionClient client (nh, "joint_trajectory_action"); // if (!client.waitForServer(ros::Duration(1.0))) // { // ROS_WARN("[Quick Exe] Exec timed out"); // } // else // { // ROS_INFO("[Quick Exe] Found action"); // } // control_msgs::FollowJointTrajectoryGoal goal; // goal.trajectory = ros_traj; // // client.sendGoal(goal);
save user-defined reset pose in framefab_core.
Then design a message for general joint to joint planning (with immediate execution), computed in framefab_process_planning
std::vector framefab_process_planning::getCurrentJointState(const std::string& topic)
{
sensor_msgs::JointStateConstPtr state = ros::topic::waitForMessage(
topic, ros::Duration(DEFAULT_JOINT_WAIT_TIME));
if (!state)
throw std::runtime_error("Joint state message capture failed");
return state->position;
}
// // step 5: immediate execution (a quick solution for debugging) // ros::NodeHandle nh; // actionlib::SimpleActionClient client (nh, "joint_trajectory_action");
// if (!client.waitForServer(ros::Duration(1.0)))
// {
// ROS_WARN("[Quick Exe] Exec timed out");
// }
// else
// {
// ROS_INFO("[Quick Exe] Found action");
// }
// control_msgs::FollowJointTrajectoryGoal goal;
// goal.trajectory = ros_traj;
//
// client.sendGoal(goal);