20 #include <open_manipulator_msgs/SetJointPosition.h> 21 #include <std_msgs/Float64.h> 22 #include <std_msgs/Float64MultiArray.h> 28 open_manipulator_msgs::SetJointPosition::Response &res)
30 std_msgs::Float64 position;
31 position.data = req.joint_position.position.at(0);
33 std_msgs::Float64MultiArray position_array;
34 position_array.data.push_back(position.data);
36 gazebo_gripper_pub_.
publish(position);
37 platform_gripper_pub_.
publish(position_array);
39 res.is_planned =
true;
46 platform_gripper_pub_ = nh.
advertise<std_msgs::Float64MultiArray>(
"gripper_position", 10);
47 gazebo_gripper_pub_ = nh.
advertise<std_msgs::Float64>(
"gripper_position/command", 10);
55 int main(
int argc,
char **argv)
void publish(const boost::shared_ptr< M > &message) const
int main(int argc, char **argv)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
void initPublisher(ros::NodeHandle nh)
ROSCPP_DECL void spin(Spinner &spinner)
bool gripperCallback(open_manipulator_msgs::SetJointPosition::Request &req, open_manipulator_msgs::SetJointPosition::Response &res)
ros::ServiceServer gripper_server_
ros::Publisher platform_gripper_pub_
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void initServer(ros::NodeHandle nh)
ros::Publisher gazebo_gripper_pub_