[ros-users] Linking problems

Nicolás Alvarez Picco nicolasapicco at hotmail.com
Wed Dec 8 13:48:36 UTC 2010


Hi!
I am running my program and after a while this thing appear in my terminal:


7faef3081000-7faef3084000 r--p 00051000 08:06 10881485                   /home/robot/src/ros/stacks/common/pluginlib/lib/libpoco_lite.so
7faef3084000-7faef3085000 rw-p 00054000 08:06 10881485                   /home/robot/src/ros/stacks/common/pluginlib/lib/libpoco_lite.so
7faef3085000-7faef308a000 r-xp 00000000 08:06 11406177                   /home/robot/src/ros/stacks/navigation/voxel_grid/lib/libvoxel_grid.so
7faef308a000-7faef3289000 ---p 00005000 08:06 11406177                   /home/robot/src/ros/stacks/navigation/voxel_grid/lib/libvoxel_grid.so
7faef3289000-7faef328a000 r--p 00004000 08:06 11406177                   /home/robot/src/ros/stacks/navigation/voxel_grid/lib/libvoxel_grid.so
7faef328a000-7faef328b000 rw-p 00005000 08:06 11406177                   /home/robot/src/ros/stacks/navigation/voxel_grid/lib/libvoxel_grid.so
7faef328b000-7faef32de000 r-xp 00000000 08:06 11012317                   /home/robot/src/ros/stacks/common/yaml_cpp/yaml-cpp/lib/libyaml-cpp.so.0.2.2
7faef32de000-7faef34dd000 ---p 00053000 08:06 11012317                   /home/robot/src/ros/stacks/common/yaml_cpp/yaml-cpp/lib/libyaml-cpp.so.0.2.2
7faef34dd000-7faef34de000 r--p 00052000 08:06 11012317                   /home/robot/src/ros/stacks/common/yaml_cpp/yaml-cpp/lib/libyaml-cpp.so.0.2.2
7faef34de000-7faef34df000 rw-p 00053000 08:06 11012317                   /home/robot/src/ros/stacks/common/yaml_cpp/yaml-cpp/lib/libyaml-cpp.so.0.2.2
7faef34df000-7faef34e3000 rw-p 00000000 00:00 0 
7faef34e3000-7faef3513000 r-xp 00000000 08:06 10227460                   /home/robot/src/ros/stacks/laser_pipeline/laser_geometry/lib/liblaser_geometry.so
7faef3513000-7faef3713000 ---p 00030000 08:06 10227460                   /home/robot/src/ros/stacks/laser_pipeline/laser_geometry/lib/liblaser_geometry.so
7faef3713000-7faef3714000 r--p 00030000 08:06 10227460                   /home/robot/src/ros/stacks/laser_pipeline/laser_geometry/lib/liblaser_geometry.so
7faef3714000-7faef3716000 rw-p 00031000 08:06 10227460                   /home/robot/src/ros/stacks/laser_pipeline/laser_geometry/lib/liblaser_geometry.so
7faef3716000-7faef379d000 r-xp 00000000 08:06 11797446                   /home/robot/src/ros/stacks/navigation/costmap_2d/lib/libcostmap_2d.so
7faef379d000-7faef399c000 ---p 00087000 08:06 11797446                   /home/robot/src/ros/stacks/navigation/costmap_2d/lib/libcostmap_2d.so
7faef399c000-7faef399f000 r--p 00086000 08:06 11797446                   /home/robot/src/ros/stacks/navigation/costmap_2d/lib/libcostmap_2d.so
7faef399f000-7faef39a1000 rw-p 00089000 08:06 11797446                   /home/robot/src/ros/stacks/navigation/costmap_2d/lib/libcostmap_2d.so
7faef39a1000-7faef39ef000 r-xp 00000000 08:06 11143515                   /home/robot/src/ros/stacks/navigation/base_local_planner/lib/libbase_local_planner.so
7faef39ef000-7faef3bee000 ---p 0004e000 08:06 11143515                   /home/robot/src/ros/stacks/navigation/base_local_planner/lib/libbase_local_planner.so
7faef3bee000-7faef3bf0000 r--p 0004d000 08:06 11143515                   /home/robot/src/ros/stacks/navigation/base_local_planner/lib/libbase_local_planner.so
7faef3bf0000-7faef3bf1000 rw-p 0004f000 08:06 11143515                   /home/robot/src/ros/stacks/navigation/base_local_planner/lib/libbase_local_planner.so
7faef3bf1000-7faef3bff000 r-xp 00000000 08:06 11797475                   /home/robot/src/ros/stacks/navigation/rotate_recovery/lib/librotate_recovery.so
7faef3bff000-7faef3dff000 ---p 0000e000 08:06 11797475                   /home/robot/src/ros/stacks/navigation/rotate_recovery/lib/librotate_recovery.so
7faef3dff000-7faef3e00000 r--p 0000e000 08:06 11797475                   /home/robot/src/ros/stacks/navigation/rotate_recovery/lib/librotate_recovery.so
7faef3e00000-7faef3e01000 rw-p 0000f000 08:06 11797475                   /home/robot/src/ros/stacks/navigation/rotate_recovery/lib/librotate_recovery.so
7faef3e01000-7faef3e07000 r-xp 00000000 08:06 10488557                   /home/robot/src/ros/stacks/navigation/clear_costmap_recovery/lib/libclear_costmap_recovery.so
7faef3e07000-7faef4006000 ---p 00006000 08:06 10488557                   /home/robot/src/ros/stacks/navigation/clear_costmap_recovery/lib/libclear_costmap_recovery.so
7faef4006000-7faef4007000 r--p 00005000 08:06 10488557                   /home/robot/src/ros/stacks/navigation/clear_costmap_recovery/lib/libclear_costmap_recovery.so
7faef4007000-7faef4008000 rw-p 00006000 08:06 10488557                   /home/robot/src/ros/stacks/navigation/clear_costmap_recovery/lib/libclear_costmap_recovery.so
7faef4008000-7faef4034000 r-xp 00000000 08:06 11799525                   /home/robot/src/ros/stacks/navigation/navfn/lib/libnavfn.so
7faef4034000-7faef4233000 ---p 0002c000 08:06 11799525                   /home/robot/src/ros/stacks/navigation/navfn/lib/libnavfn.so
7faef4233000-7faef4235000 r--p 0002b000 08:06 11799525                   /home/robot/src/ros/stacks/navigation/navfn/lib/libnavfn.so
7faef4235000-7faef4236000 rw-p 0002d000 08:06 11799525                   /home/robot/src/ros/stacks/navigation/navfn/lib/libnavfn.so
7faef4236000-7faef424d000 r-xp 00000000 08:06 9964732                    /home/robot/src/ros/stacks/common/actionlib/lib/libactionlib.so


This is just an extract of the long list. 
The code that I can show you for you to how more info is :

bool Safety_Manager::is_PICS_safe (double x,double y, pcl::PointCloud<pcl::PointXYZ> pts_laser2){
  vel_max=0.5;
  double dist_obstacles, radio_cono= vel_max * time_step;
  int size_cloud= pts_laser2.points.size();
  for(size_t it = 0; it < size_cloud; it++){
        dist_obstacles=sqrt(pow(pts_laser2.points[it].x-x,2)+
                    pow(pts_laser2.points[it].y-y,2)); //distancia entre 2 muestras consecutivas
        if(dist_obstacles < radio_cono)
            return false;
  }
  
  return (true);
}


Where the point cloud is the result of procesing the laser data receive from a simulated laser:


void ROS_Link::Callback(const sensor_msgs::PointCloud2::ConstPtr& msglaser)
{
    pcl::PointCloud<pcl::PointXYZ>  laser_finish;
    pcl::fromROSMsg(*msglaser, laser_ready);
     
    double diffsamples=0;
    double diffcompare=0.5; // Value calculated considering the laser features
    int size_cloud=laser_ready.points.size();
    int pointsize=size_cloud;
        
    
    for(size_t it = 0; it < size_cloud; it++){
                
        diffsamples=sqrt(pow(laser_ready.points[it].x-laser_ready.points[it-1].x,2)+
                    pow(laser_ready.points[it].y-laser_ready.points[it-1].y,2)); //distancia entre 2 muestras consecutivas
        if(diffsamples > diffcompare){
             int cant_newpts=ROS_Link::samplePointsOnLine (laser_ready.points[it],laser_ready.points[it-1], diffcompare,pts);
             pointsize=cant_newpts+pointsize;
             laser_ready.points.resize (pointsize);
             laser_ready.width = pointsize; 
             laser_ready.height = 1;
             laser_ready+=pts;
         }
        
    } 
    pcl::toROSMsg(laser_ready,laser_topublish);
    cloud_finish_pub.publish(laser_topublish);
    
}    
    
    /** \brief Sample points on a line (formed from p1 and p2) using a given
                * resolution <res>
                * \param p1 the first point
                * \param p2 the second point
                * \param res the resolution of the line
                * \param pts the resultant points
                */
int    ROS_Link::samplePointsOnLine (pcl::PointXYZ p1, pcl::PointXYZ p2, double res, pcl::PointCloud<pcl::PointXYZ> &pts){
                    
                    pts=laser_ready;
                    Eigen3::Vector4f dp = p2.getVector4fMap () - p1.getVector4fMap ();
                    // Compute the distance between the two points
                    double dist = dp.norm ();
                    dp.normalize ();
    
                    Eigen3::Vector4f axis_x (1.0, 0.0, 0.0,0.0), axis_y (0.0, 1.0, 0.0, 0.0), axis_z (0.0, 0.0, 1.0, 0.0);
                    // Compute the axis increments
                    double dx = res * dp.dot (axis_x);
                    double dy = res * dp.dot (axis_y);
                    double dz = res * dp.dot (axis_z);
 
                    int nr_pts = dist / res;
                    if (nr_pts < 1)
                    return (0);
 
                    pts.points.resize (nr_pts);
                    pts.width = nr_pts; pts.height = 1;
                    for (int m = 0; m < nr_pts; ++m)
                    {
                        pts.points[m].x = (m + 1) * dx + p1.x;
                        pts.points[m].y = (m + 1) * dy + p1.y;
                        pts.points[m].z = (m + 1) * dz + p1.z;
                    }
                    return (nr_pts);
    }

I suppose this is a problem of memory and linking, but I don't have any idea how can I solve this problem. So I hear ideas!!!!!!

Thanksssssssss

Nicolas 

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20101208/9fcf2807/attachment-0002.html>


More information about the ros-users mailing list