18 #include "../test/Test.h" 63 sensor_msgs::PointCloud2 base_cloud;
78 msg->pose.orientation.w));
84 tf::Quaternion q(msg->pose.orientation.x, msg->pose.orientation.y, msg->pose.orientation.z,
85 +msg->pose.orientation.w);
87 double roll, pitch, yaw;
99 geometry_msgs::TransformStamped vicon_relative;
101 vicon_relative.header.frame_id =
"vicon_odometry";
102 vicon_relative.transform.translation.x = position.
getX();
103 vicon_relative.transform.translation.y = position.
getY();
104 vicon_relative.transform.translation.z = position.
getZ();
105 vicon_relative.transform.rotation.x = orientation.getX();
106 vicon_relative.transform.rotation.y = orientation.getY();
107 vicon_relative.transform.rotation.z = orientation.getZ();
108 vicon_relative.transform.rotation.w = orientation.
getW();
ros::Subscriber vicon_sub_
static tf::Quaternion createQuaternionFromRPY(double roll, double pitch, double yaw)
tf::Transform vicon_init_tf_
void publish(const boost::shared_ptr< M > &message) const
tf::Transform vicon_relative_tf_
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL const std::string & getName()
TFSIMD_FORCE_INLINE const tfScalar & getY() const
TFSIMD_FORCE_INLINE const tfScalar & getW() const
TFSIMD_FORCE_INLINE const tfScalar & getZ() const
void baseCallback(const geometry_msgs::PoseStampedConstPtr &msg)
void getRPY(tfScalar &roll, tfScalar &pitch, tfScalar &yaw, unsigned int solution_number=1) const
tf::Transform pointcloud_2base_tf_
void cloudCallback(const sensor_msgs::PointCloud2Ptr &msg)
tf::TransformBroadcaster br_
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
ros::Publisher vicon_pub_
void transformPointCloud(const pcl::PointCloud< PointT > &cloud_in, pcl::PointCloud< PointT > &cloud_out, const tf::Transform &transform)
ros::Publisher pointcloud_pub_
TFSIMD_FORCE_INLINE const tfScalar & getX() const
ros::Subscriber pointcloud_sub_
ROSCPP_DECL void spinOnce()