32 #ifndef VRPN_CLIENT_ROS_VRPN_CLIENT_ROS_H 33 #define VRPN_CLIENT_ROS_VRPN_CLIENT_ROS_H 38 #include "geometry_msgs/PoseStamped.h" 39 #include "geometry_msgs/TwistStamped.h" 40 #include "geometry_msgs/AccelStamped.h" 41 #include "geometry_msgs/TransformStamped.h" 43 #include <vrpn_Tracker.h> 44 #include <vrpn_Connection.h> 47 #include <unordered_map> 59 typedef std::shared_ptr<VrpnTrackerRos>
Ptr;
95 static void VRPN_CALLBACK
handle_pose(
void *userData,
const vrpn_TRACKERCB tracker_pose);
97 static void VRPN_CALLBACK
handle_twist(
void *userData,
const vrpn_TRACKERVELCB tracker_twist);
99 static void VRPN_CALLBACK
handle_accel(
void *userData,
const vrpn_TRACKERACCCB tracker_accel);
106 typedef std::shared_ptr<VrpnClientRos>
Ptr;
107 typedef std::unordered_map<std::string, VrpnTrackerRos::Ptr>
TrackerMap;
124 void updateTrackers();
144 #endif // VRPN_CLIENT_ROS_VRPN_CLIENT_ROS_H
geometry_msgs::AccelStamped accel_msg_
geometry_msgs::PoseStamped pose_msg_
std::vector< ros::Publisher > twist_pubs_
ConnectionPtr connection_
std::shared_ptr< VrpnClientRos > Ptr
ros::NodeHandle output_nh_
VrpnTrackerRos(std::string tracker_name, ConnectionPtr connection, ros::NodeHandle nh)
ros::NodeHandle output_nh_
static void VRPN_CALLBACK handle_twist(void *userData, const vrpn_TRACKERVELCB tracker_twist)
std::vector< ros::Publisher > pose_pubs_
void init(std::string tracker_name, ros::NodeHandle nh, bool create_mainloop_timer)
std::shared_ptr< VrpnTrackerRos > Ptr
ros::Timer refresh_tracker_timer_
TrackerRemotePtr tracker_remote_
std::unordered_map< std::string, VrpnTrackerRos::Ptr > TrackerMap
std::shared_ptr< vrpn_Tracker_Remote > TrackerRemotePtr
geometry_msgs::TwistStamped twist_msg_
std::shared_ptr< vrpn_Connection > ConnectionPtr
std::vector< ros::Publisher > accel_pubs_
geometry_msgs::TransformStamped transform_stamped_
ros::Timer mainloop_timer
static void VRPN_CALLBACK handle_accel(void *userData, const vrpn_TRACKERACCCB tracker_accel)
static void VRPN_CALLBACK handle_pose(void *userData, const vrpn_TRACKERCB tracker_pose)