ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

viki_rover's profile - activity

2016-10-20 22:19:58 -0500 received badge  Famous Question (source)
2016-10-20 22:19:58 -0500 received badge  Notable Question (source)
2016-10-20 22:19:58 -0500 received badge  Popular Question (source)
2016-07-19 04:15:46 -0500 received badge  Enthusiast
2016-07-14 06:15:22 -0500 asked a question No publishing after launching pointCloudAssembler

Good afternoon,

After launching this file on a ros indigo virtual machine :

<launch>
  <node type="point_cloud_assembler" pkg="laser_assembler" name="my_assembler">
    <remap from="cloud" to="/cloud"/>
    <param name="max_clouds" type="int" value="400" />
    <param name="fixed_frame" type="string" value="base_link" />
  </node>
</launch>

and calling the assemble_scans with this command :

 rosservice call /assemble_scans 100000 10000000000

I get this :

cloud: 
  header: 
    seq: 0
    stamp: 
      secs: 10
      nsecs: 0
    frame_id: base_link
  points: []
  channels: []

and no topic is published ( I expect the topic assembled_cloud to appear on rostopic list )

I have tried to change the interval of time but nothing happens.

Do you have an idea why nothing is published ?

Thank you for your time.

2016-07-14 05:48:39 -0500 commented answer Lookup would require extrapolation into the past

Thank you for your answer it worked !

2016-07-14 05:47:49 -0500 received badge  Scholar (source)
2016-07-14 05:47:47 -0500 received badge  Supporter (source)
2016-07-11 08:30:55 -0500 asked a question Lookup would require extrapolation into the past

Good afternoon,

I have a problem when converting a laser scan into a point cloud map using ros indigo virtual machine. I get the following error :

terminate called after throwing an instance of 'tf2::ExtrapolationException' what(): Lookup would require extrapolation into the past. Requested time 1467669390.062319560 but the earliest data is at time 1467669390.111446506, when looking up transform from frame [LIDAR] to frame [base_link] Aborted (core dumped)

After running this code:

#include <tf/transform_listener.h>
#include <laser_geometry/laser_geometry.h>
#include <ros/ros.h>


class My_Filter {
     public:
        My_Filter();
        void scanCallback(const sensor_msgs::LaserScan::ConstPtr& scan);
     private:
        ros::NodeHandle node_;
        laser_geometry::LaserProjection projector_;
        tf::TransformListener tfListener_;

        ros::Publisher point_cloud_publisher_;
        ros::Subscriber scan_sub_;
};

My_Filter::My_Filter(){
        scan_sub_ = node_.subscribe<sensor_msgs::LaserScan> ("/scan", 100, &My_Filter::scanCallback, this);
        point_cloud_publisher_ = node_.advertise<sensor_msgs::PointCloud2> ("/cloud", 100, false);
        tfListener_.setExtrapolationLimit(ros::Duration(10.0));
}

void My_Filter::scanCallback(const sensor_msgs::LaserScan::ConstPtr& scan){
    sensor_msgs::PointCloud2 cloud;
    projector_.transformLaserScanToPointCloud("base_link", *scan, cloud, tfListener_);
    point_cloud_publisher_.publish(cloud);
}

int main(int argc, char** argv)
{
    ros::init(argc, argv, "my_filter");

    My_Filter filter;

    ros::spin();

    return 0;
}

Thank you for your help