Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Publishing tf with kinect and watch it in rviz

Hiiiii

I am trying to do a tf with kinect, but I can not visualize it with rviz.

I have done a tf_broadcaster similar that the ros tutorials, but I don't know the way to link the last son of the tf tree to the kinect, this is the code of the last son:

#include <ros/ros.h>
#include <tf/transform_broadcaster.h>

int main(int argc, char** argv){
  ros::init(argc, argv, "robot_tf_publisher_vertical_kinect");
  ros::NodeHandle n;

  ros::Rate r(100);

  tf::TransformBroadcaster broadcaster;
  while(n.ok())
  {

    broadcaster.sendTransform(
      tf::StampedTransform(
        tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.4, 0, 1.25)),

                    ros::Time::now(),"base_link", "camera_link"));

    r.sleep();
  }
}

And this is the tf view_frames:frames

I don't know if it works because I dont know watch in rviz the tf and pointcloud from kinect. Please can somebody help me?

Thanks

Publishing tf with kinect and watch it in rviz

Hiiiii

I am trying to do a tf with kinect, but I can not visualize it with rviz.

I have done a tf_broadcaster similar that the ros tutorials, but I don't know the way to link the last son of the tf tree to the kinect, this is the code of the last son:

#include <ros/ros.h>
#include <tf/transform_broadcaster.h>

int main(int argc, char** argv){
  ros::init(argc, argv, "robot_tf_publisher_vertical_kinect");
  ros::NodeHandle n;

  ros::Rate r(100);

  tf::TransformBroadcaster broadcaster;
  while(n.ok())
  {

    broadcaster.sendTransform(
      tf::StampedTransform(
        tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.4, 0, 1.25)),

                    ros::Time::now(),"base_link", "camera_link"));

    r.sleep();
  }
}

And this is the tf view_frames:view_frames:!frames

I don't know if it works because I dont know watch in rviz the tf and pointcloud from kinect. Please can somebody help me?

Thanks

Publishing tf with kinect and watch it in rviz

Hiiiii

I am trying to do a tf with kinect, but I can not visualize it with rviz.

I have done a tf_broadcaster similar that the ros tutorials, but I don't know the way to link the last son of the tf tree to the kinect, this is the code of the last son:

#include <ros/ros.h>
#include <tf/transform_broadcaster.h>

int main(int argc, char** argv){
  ros::init(argc, argv, "robot_tf_publisher_vertical_kinect");
  ros::NodeHandle n;

  ros::Rate r(100);

  tf::TransformBroadcaster broadcaster;
  while(n.ok())
  {

    broadcaster.sendTransform(
      tf::StampedTransform(
        tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.4, 0, 1.25)),

                    ros::Time::now(),"base_link", "camera_link"));

    r.sleep();
  }
}

And this is the tf view_frames:!framesview_frames:frames

I don't know if it works because I dont know watch in rviz the tf and pointcloud from kinect. Please can somebody help me?

Thanks

Publishing tf with kinect and watch it in rviz

Hiiiii

I am trying to do a tf with kinect, but I can not visualize it with rviz.

I have done a tf_broadcaster similar that the ros tutorials, but I don't know the way to link the last son of the tf tree to the kinect, this is the code of the last son:

#include <ros/ros.h>
#include <tf/transform_broadcaster.h>

int main(int argc, char** argv){
  ros::init(argc, argv, "robot_tf_publisher_vertical_kinect");
  ros::NodeHandle n;

  ros::Rate r(100);

  tf::TransformBroadcaster broadcaster;
  while(n.ok())
  {

    broadcaster.sendTransform(
      tf::StampedTransform(
        tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.4, 0, 1.25)),

                    ros::Time::now(),"base_link", "camera_link"));

    r.sleep();
  }
}

And this is the tf view_frames:frames

I don't know if it works because I dont know watch in rviz the tf and pointcloud from kinect. Please can somebody help me?

Thanks