30 cmd_vel_topic_(cmd_vel_topic),
31 joint_angles_topic_(joint_angles_topic),
33 p_motion_( session->service(
"ALMotion") )
47 const float& vel_x = twist_msg->linear.x;
48 const float& vel_y = twist_msg->linear.y;
49 const float& vel_th = twist_msg->angular.z;
51 std::cout <<
"going to move x: " << vel_x <<
" y: " << vel_y <<
" th: " << vel_th << std::endl;
52 p_motion_.async<
void>(
"move", vel_x, vel_y, vel_th );
57 if ( js_msg->relative==0 )
59 p_motion_.async<
void>(
"setAngles", js_msg->joint_names, js_msg->joint_angles, js_msg->speed);
63 p_motion_.async<
void>(
"changeAngles", js_msg->joint_names, js_msg->joint_angles, js_msg->speed);
ros::Subscriber sub_cmd_vel_
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
std::string joint_angles_topic_
void joint_angles_callback(const naoqi_bridge_msgs::JointAnglesWithSpeedConstPtr &js_msg)
std::string cmd_vel_topic_
ros::Subscriber sub_joint_angles_
void cmd_vel_callback(const geometry_msgs::TwistConstPtr &twist_msg)
TeleopSubscriber(const std::string &name, const std::string &cmd_vel_topic, const std::string &joint_angles_topic, const qi::SessionPtr &session)
void reset(ros::NodeHandle &nh)