2 #include <trajectory_msgs/JointTrajectory.h> 6 #include <std_srvs/Trigger.h> 14 std_srvs::Trigger::Response &res)
17 std::vector<double> head_goal(2);
20 trajectory_msgs::JointTrajectory traj;
22 traj.joint_names.push_back(
"head_pan_joint");
23 traj.joint_names.push_back(
"head_tilt_joint");
24 traj.points.resize(1);
26 std::vector<double> q_goal(2);
27 q_goal[0]=head_goal[0];
28 q_goal[1]=head_goal[1];
29 traj.points[0].positions=q_goal;
30 traj.points[0].velocities.push_back(0.1);
31 traj.points[0].velocities.push_back(0.1);
43 if(group.
plan(startPosPlan))
46 res.message =
"shutdown preparation finished";
51 res.message =
"move arm to driving mode failed (planning failed)";
58 int main(
int argc,
char** argv) {
60 ros::init(argc, argv,
"prepare_shutdown_node");
62 traj_pub = nh.
advertise<trajectory_msgs::JointTrajectory>(
"/pan_tilt_trajectory_controller/command", 5);
74 ROS_INFO(
"[prepare_shutdown_node]: ready");
void publish(const boost::shared_ptr< M > &message) const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void setPoseReferenceFrame(const std::string &pose_reference_frame)
void setPlannerId(const std::string &planner_id)
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
void setPlanningTime(double seconds)
ROSCPP_DECL void spin(Spinner &spinner)
ros::ServiceServer shutdown_srv
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
MoveItErrorCode execute(const Plan &plan)
MoveItErrorCode plan(Plan &plan)
void setNumPlanningAttempts(unsigned int num_planning_attempts)
int main(int argc, char **argv)
bool prepareShutdownCB(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res)
uint32_t getNumSubscribers() const
ROSCPP_DECL void spinOnce()
bool setNamedTarget(const std::string &name)
void setStartStateToCurrentState()