• 大小: 59.19MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2023-02-20
  • 语言: 其他
  • 标签: ROS  

资源简介

这本书环境是ROS-Kinect,具体安装配置请看ROS wiki。

资源截图

代码片段和文件信息

#include 
#include 
#include 
#include 

main (int argc char **argv)
{
    ros::init (argc argv “pcl_create“);

    ros::NodeHandle nh;
    ros::Publisher pcl_pub = nh.advertise (“pcl_output“ 1);
    pcl::PointCloud cloud;
    sensor_msgs::PointCloud2 output;

    // Fill in the cloud data
    cloud.width  = 100;
    cloud.height = 1;
    cloud.points.resize(cloud.width * cloud.height);

    for (size_t i = 0; i < cloud.points.size (); ++i)
    {
        cloud.points[i].x = 1024 * rand () / (RAND_MAX + 1.0f);
        cloud.points[i].y = 1024 * rand () / (RAND_MAX + 1.0f);
        cloud.points[i].z = 1024 * rand () / (RAND_MAX + 1.0f);
    }

    //Convert the cloud to ROS message
    pcl::toROSMsg(cloud output);
    output.header.frame_id = “odom“;

    ros::Rate loop_rate(1);
    while (ros::ok())
    {
        pcl_pub.publish(output);
        ros::spinOnce();
        loop_rate.sleep();
    }

    return 0;
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\
     目录           0  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\
     文件        1572  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\CMakeLists.txt
     目录           0  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\data\
     文件    17492958  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\data\test_pcd.pcd
     文件        3608  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\data\write_pcd_test.pcd
     文件        1116  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\package.xml
     目录           0  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\
     文件        1063  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\pcl_create.cpp
     文件        1178  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\pcl_downsampling.cpp
     文件        1207  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\pcl_filter.cpp
     文件        1569  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\pcl_matching.cpp
     文件        1811  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\pcl_model_estimation.cpp
     文件        1720  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\pcl_partitioning.cpp
     文件        2524  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\pcl_planar_segmentation.cpp
     文件         711  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\pcl_read.cpp
     文件        1043  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\pcl_visualize.cpp
     文件        2005  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\pcl_visualize2.cpp
     文件         559  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter10_tutorials\src\pcl_write.cpp
     目录           0  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\
     目录           0  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\cfg\
     文件         843  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\cfg\chapter2.cfg
     文件        6628  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\CMakeLists.txt
     目录           0  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\launch\
     文件         208  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\launch\chapter2.launch
     目录           0  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\msg\
     文件          24  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\msg\chapter2_msg1.msg
     文件        1033  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\package.xml
     目录           0  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\src\
     文件         527  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\src\example1_a.cpp
     文件         358  2017-11-23 15:29  effective_robotics_programming_with_ros-master\effective_robotics_programming_with_ros-master\chapter2_tutorials\src\example1_b.cpp
............此处省略403个文件信息

评论

共有 条评论