19 #include "asr_msgs/AsrObject.h" 20 #include <sensor_msgs/JointState.h> 36 if (msg->identifier ==
"tracker_right")
40 if(!msg->sampledPoses.size())
42 std::cerr <<
"Got a AsrObject without poses." << std::endl;
46 geometry_msgs::Pose current_pose = msg->sampledPoses.front().pose;
47 geometry_msgs::Point position = current_pose.position;
49 odom_trans.transform.translation.x = position.x;
50 odom_trans.transform.translation.y = position.y;
51 odom_trans.transform.translation.z = position.z;
52 odom_trans.transform.rotation = current_pose.orientation;
62 int main(
int argc,
char **argv)
73 pub_states = node.
advertise<sensor_msgs::JointState>(
"joint_states", 1);
void publish(const boost::shared_ptr< M > &message) const
int main(int argc, char **argv)
tf::TransformBroadcaster * pub_tf
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ROSCPP_DECL void spin(Spinner &spinner)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
sensor_msgs::JointState joint_state
void callback_tf(const asr_msgs::AsrObjectConstPtr &msg)
geometry_msgs::TransformStamped odom_trans
ros::Publisher pub_states