精华内容
下载资源
问答
  • ROS学习教材参考

    2021-01-15 11:37:47
    -《ROS机器人程序设计》 [西班牙 Aaron Martinez Fern a’ ndez] 《机器人学导论(原著第三版)》[美 HLHN J.CRAIG] 著 《机器人学导论-分析、系统及应用》 [美 Saeed B. Niku] 著 《开源机器人操作系统-ROS》张建伟...

    -《ROS机器人程序设计》 [西班牙 Aaron Martinez Fern a’ ndez]

    《机器人学导论(原著第三版)》[美 HLHN J.CRAIG] 著

    《机器人学导论-分析、系统及应用》 [美 Saeed B. Niku] 著

    《开源机器人操作系统-ROS》张建伟著

    《A Gentle Introduction to ROS》

    《ROS机器人编程》

    《ROS机器人开发实践 》[胡春旭][机械工业出版社]

    《机器人操作系统(ROS)浅析-Version1.42》

    《视觉SLAM十四讲-从理论到实践》高翔、张涛 著

    以上数据我都有电子版,有想要的小伙伴可以私信我,但是仅做学习交流哦

    展开全文
  • 配置方法参考ROS学习笔记(1)中的话题示例 常用的参数命令行 #列出当前的参数 rosparam list #显示某个参数值 rosparam get param_key #设置某个参数值 rosparam set param_key param_value #保存参数到文件 ...

    1.参数的使用与编程

    常用的参数命令行

    #列出当前的参数
    rosparam list
    
    #显示某个参数值 
    rosparam get param_key  
    
    #设置某个参数值  
    rosparam set param_key param_value
        
    #保存参数到文件  
    rosparam dump file_name    
    
    #从文件读取参数  
    rosparam load file_name
        
    #删除参数  
    rosparam delete param_key
    

    C++代码示例

    
    /**
     * 该例程设置/读取海龟例程中的参数
     */
    #include <string>
    #include <ros/ros.h>
    #include <std_srvs/Empty.h>
    
    int main(int argc, char **argv)
    {
        int red, green, blue;
    
        /* ROS节点初始化 */
        ros::init(argc, argv, "parameter_config");
    
        /* 创建节点句柄 */
        ros::NodeHandle node;
    
        /* 读取背景颜色参数 */
        ros::param::get("/background_r", red);
        ros::param::get("/background_g", green);
        ros::param::get("/background_b", blue);
    
        /* 打印信息 */
        ROS_INFO("Get Backgroud Color[%d, %d, %d]", red, green, blue);
    
        /* 设置背景颜色参数 */
        ros::param::set("/background_r", 255);
        ros::param::set("/background_g", 255);
        ros::param::set("/background_b", 255);
    
        ROS_INFO("Set Backgroud Color[255, 255, 255]");
    
        /* 读取背景颜色参数 */
        ros::param::get("/background_r", red);
        ros::param::get("/background_g", green);
        ros::param::get("/background_b", blue);
    
        ROS_INFO("Re-get Backgroud Color[%d, %d, %d]", red, green, blue);
    
        /* 调用服务,刷新背景颜色 */
        ros::service::waitForService("/clear");
        ros::ServiceClient clear_background = node.serviceClient<std_srvs::Empty>("/clear");
        std_srvs::Empty srv;
        clear_background.call(srv);
        
        sleep(1);
    
        return 0;
    }
    

    python代码示例

    # 该例程设置/读取海龟例程中的参数
    
    import sys
    import rospy
    from std_srvs.srv import Empty
    
    def parameter_config():
        # ROS节点初始化
        rospy.init_node('parameter_config', anonymous=True)
    
        # 读取背景颜色参数
        red   = rospy.get_param('/background_r')
        green = rospy.get_param('/background_g')
        blue  = rospy.get_param('/background_b')
    
        rospy.loginfo("Get Backgroud Color[%d, %d, %d]", red, green, blue)
    
        # 设置背景颜色参数
        rospy.set_param("/background_r", 255);
        rospy.set_param("/background_g", 255);
        rospy.set_param("/background_b", 255);
    
        rospy.loginfo("Set Backgroud Color[255, 255, 255]");
    
        # 读取背景颜色参数
        red   = rospy.get_param('/background_r')
        green = rospy.get_param('/background_g')
        blue  = rospy.get_param('/background_b')
    
        rospy.loginfo("Get Backgroud Color[%d, %d, %d]", red, green, blue)
    
        # 发现/spawn服务后,创建一个服务客户端,连接名为/spawn的service
        rospy.wait_for_service('/clear')
        try:
            clear_background = rospy.ServiceProxy('/clear', Empty)
    
            # 请求服务调用,输入请求数据
            response = clear_background()
            return response
        except rospy.ServiceException, e:
            print "Service call failed: %s"%e
    
    if __name__ == "__main__":
        parameter_config()
    

    2.坐标系管理系统

    • 使用的库:tf(transform)
    • 例程:小海龟的跟随实验
    roslaunch turtle_tf turtle_tf_demo.launch 
    rosrun turtlesim turtle_teleop_key 
    rosrun tf view_frames
    
    • 监听坐标变换的命令行
    rosrun tf tf_echo turtle1 turtle2
    
    • 可视化工具:rivz
    rosrun rviz rviz -d `rospack find turtle_tf`/rviz/turtle_rviz.rviz
    

    1.tf坐标系的使用方法

    (1)编写tf广播和监听的代码

    (2)配置参考上面的话题

    (3)编译执行

    #C++示例
    rosrun learning_tf turtle_tf_broadcaster __name:=turtle1_tf_broadcaster /turtle1
    rosrun learning_tf turtle_tf_broadcaster __name:=turtle2_tf_broadcaster /turtle2
    rosrun learning_tf turtle_tf_listener
    
    • __name:=… 表示传入main函数中的argv参数,第一个表示节点名称,后面的参数自定义,这里定义的第二个是需要广播的海龟名字。
    • 注意:在需要传入参数的情况下,不可以直接运行.py文件,需要结合launch文件使用

    2.tf坐标系的广播

    C++代码示例

    /**
     * 该例程产生tf数据,并计算、发布turtle2的速度指令
     */
    #include <ros/ros.h>
    #include <tf/transform_broadcaster.h>
    #include <turtlesim/Pose.h>
    
    std::string turtle_name;
    
    void poseCallback(const turtlesim::PoseConstPtr& msg)
    {
        /* 创建tf的广播器 */
        static tf::TransformBroadcaster br;
    
        /* 初始化tf数据 */
        tf::Transform transform;
        transform.setOrigin( tf::Vector3(msg->x, msg->y, 0.0) );
        tf::Quaternion q;
        q.setRPY(0, 0, msg->theta);
        transform.setRotation(q);
    
        /* 广播world与海龟坐标系之间的tf数据 */
        br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "world", turtle_name));
    }
    
    int main(int argc, char** argv)
    {
        /* 初始化ROS节点 */
        ros::init(argc, argv, "my_tf_broadcaster");
    
        /* 输入参数作为海龟的名字 */
        if (argc != 2)
        {
            ROS_ERROR("need turtle name as argument"); 
            return -1;
        }
    
        turtle_name = argv[1];
    
        /* 订阅海龟的位姿话题 */
        ros::NodeHandle node;
        ros::Subscriber sub = node.subscribe(turtle_name+"/pose", 10, &poseCallback);
    
        /* 循环等待回调函数 */
        ros::spin();
    
        return 0;
    };
    

    python代码示例

    # 该例程产生tf数据,并计算、发布turtle2的速度指令
    
    import roslib
    roslib.load_manifest('learning_tf')
    import rospy
    
    import tf
    import turtlesim.msg
    
    def handle_turtle_pose(msg, turtlename):
        #创建发布者
        br = tf.TransformBroadcaster()
    
        #发布tf转换数据
        br.sendTransform((msg.x, msg.y, 0),
                         tf.transformations.quaternion_from_euler(0, 0, msg.theta),
                         rospy.Time.now(),
                         turtlename,
                         "world")
    
    if __name__ == '__main__':
        #初始化ROS节点
        rospy.init_node('turtle_tf_broadcaster')
    
        #获取乌龟对象
        turtlename = rospy.get_param('~turtle')
    
        #订阅乌龟信息
        rospy.Subscriber('/%s/pose' % turtlename,
                         turtlesim.msg.Pose,
                         handle_turtle_pose,
                         turtlename)
        #循环等待
        rospy.spin()
    

    3.tf坐标系的监听

    C++代码示例

    /**
     * 该例程监听tf数据,并计算、发布turtle2的速度指令
     */
    
    #include <ros/ros.h>
    #include <tf/transform_listener.h>
    #include <geometry_msgs/Twist.h>
    #include <turtlesim/Spawn.h>
    
    int main(int argc, char** argv)
    {
        /* 初始化ROS节点 */
        ros::init(argc, argv, "my_tf_listener");
    
        /* 创建节点句柄 */
        ros::NodeHandle node;
    
        /* 请求产生turtle2 */
        ros::service::waitForService("/spawn");
        ros::ServiceClient add_turtle = node.serviceClient<turtlesim::Spawn>("/spawn");
        turtlesim::Spawn srv;
        add_turtle.call(srv);
     
        /* 创建发布turtle2速度控制指令的发布者 */
        ros::Publisher turtle_vel = node.advertise<geometry_msgs::Twist>("/turtle2/cmd_vel", 10);
    
        /* 创建tf的监听器 */
        tf::TransformListener listener;
    
        ros::Rate rate(10.0);
        while (node.ok())
        {
            /* 获取turtle1与turtle2坐标系之间的tf数据 */
            tf::StampedTransform transform;
            try
            {
                listener.waitForTransform("/turtle2", "/turtle1", ros::Time(0), ros::Duration(3.0));
                listener.lookupTransform("/turtle2", "/turtle1", ros::Time(0), transform); // 查询变换
            }
            catch (tf::TransformException &ex) 
            {
                ROS_ERROR("%s",ex.what());
                ros::Duration(1.0).sleep();
                continue;
            }
    
            /* 根据turtle1与turtle2坐标系之间的位置关系,发布turtle2的速度控制指令 */
            geometry_msgs::Twist vel_msg;
            vel_msg.angular.z = 4.0 * atan2(transform.getOrigin().y(),
                                            transform.getOrigin().x());
            vel_msg.linear.x = 0.5 * sqrt(pow(transform.getOrigin().x(), 2) +
                                          pow(transform.getOrigin().y(), 2));
            turtle_vel.publish(vel_msg);
    
            rate.sleep();
        }
        return 0;
    };
    

    python代码示例

    #  该例程监听tf数据,并计算、发布turtle2的速度指令
    
    import roslib
    roslib.load_manifest('learning_tf')
    import rospy
    import math
    import tf
    import geometry_msgs.msg
    import turtlesim.srv
    
    if __name__ == '__main__':
        #初始化ROS节点
        rospy.init_node('turtle_tf_listener')
    
        #创建监听者
        listener = tf.TransformListener()
        
        #等待指令
        rospy.wait_for_service('spawn')
        spawner = rospy.ServiceProxy('spawn', turtlesim.srv.Spawn)
        spawner(4, 2, 0, 'turtle2')
        
        #创建发布者
        turtle_vel = rospy.Publisher('turtle2/cmd_vel', geometry_msgs.msg.Twist,queue_size=1)
        
        #设置循环频率
        rate = rospy.Rate(10.0)
        while not rospy.is_shutdown():
            try:
                (trans,rot) = listener.lookupTransform('/turtle2', '/turtle1', rospy.Time(0))
            except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException):
                continue
        
            #发布运动指令
            angular = 4 * math.atan2(trans[1], trans[0])
            linear = 0.5 * math.sqrt(trans[0] ** 2 + trans[1] ** 2)
            cmd = geometry_msgs.msg.Twist()
            cmd.linear.x = linear
            cmd.angular.z = angular
            turtle_vel.publish(cmd)
            
            #循环等待
            rate.sleep()
    

    3.Launch文件的使用

    定位: 通过XML文件实现多节点的配置,并自动启动ROS MASTER

    启动

    roslaunch file-name file.launch
    

    语法

    node 启动节点

    <node pkg="package-name" type="executable-name" name="node-name" />
    
    • 还有其他配置参数如output 、respawn 、required 、ns 、args

    param 设置ROS系统运行中的参数

    <param name="output_frame" value="odom"/>
    

    rosparam 加载参数文件中的多个参数

    <rosparam file="params.yaml" command="load" ns="params"/>
    

    arg launch文件内部的局部变量

    #定义
    <arg name="arg-name" default="arg-value" />
    
    #调用
    <param name="foo" value="$(arg arg-name)" />
    <node name="node" pkg="package" type="type " args="$(arg arg-name)" />
    

    remap 重映射ROS计算图资源的命名

    <remap from="/turtlebot/cmd_vel" to="/cmd_vel"/>
    

    include 包含其他launch文件

    <include file="$(dirname)/other.launch" />
    
    展开全文
  • ROS学习笔记七:在ROS中使用USB摄像头 osc_1dcw7r5z 2019/04/03 15:48 阅读数 362 下面是一些USB摄像头的驱动(大多数摄像头都支持uvc标准): <br /> 1 使用软件库里的uvc-camera功能包 1.1 检查...

    这里给了三种方法,我感觉不错。

    摘自:https://my.oschina.net/u/4273421/blog/3587403

    ROS学习笔记七:在ROS中使用USB摄像头

    osc_1dcw7r5z

    2019/04/03 15:48

    阅读数 362

    下面是一些USB摄像头的驱动(大多数摄像头都支持uvc标准):

    <br />

    1 使用软件库里的uvc-camera功能包

    1.1 检查摄像头

    lsusb
    

    -------------------------------------

    显示如下:

    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub <span style="color:orange">Bus 001 Device 007: ID 046d:082b Logitech, Inc. Webcam C170</span> Bus 001 Device 006: ID 0461:4e2a Primax Electronics, Ltd Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    <br />

    1.2 安装uvc camera功能包

    sudo apt-get install ros-indigo-uvc-camera
    

    <br />

    1.3 安装image相关功能包

    sudo apt-get install ros-kinetic-image-*
    sudo apt-get install ros-kinetic-rqt-image-view
    

    <br />

    1.4 运行uvc_camera节点

    rosrun uvc_camera uvc_camera_node
    

    <br />

    1.5 查看图像信息

    (1)使用image_view节点查看图像

    rosrun image_view image_view image:=/image_raw
    

    -------------------------------------

    说明:最后面的附加选项“image:=/image_raw”是把话题列表中的话题以图像形式查看的选项。

    (2)用rqt_image_view节点检查

    rqt_image_view image:=/image_raw
    

    (3)使用rviz查看

    rviz
    

    增加image,然后将[Image] → [Image Topic]的值更改为“/image_raw”。

    使用apt-get安装的软件包好像只有执行程序,没有launch文件和节点源文件等等,所以采用了自建uvc-camera软件包更该参数。

    <br />

    2 使用usb_cam软件包

    2.1 安装usb_cam软件包

    sudo apt-get install ros-kinetic-usb-cam
    

    <br />

    2.2 启用launch文件

    roslaunch usb_cam usb_cam-test.launch
    

    -------------------------------------

    显示如下:

    launch文件的目录为:/opt/ros/kinetic/share/usb_cam,可在该目录下找到luanch文件并修改参数。

    <br />

    3 使用opencv驱动USB摄像头

    首先创建一个工作空间:

    $ mkdir -p ~/ros_ws/src
    $ cd ~/ros_ws/
    $ catkin_make
    $ source devel/setup.bash
    

    再建立一个功能包:

    $ cd ~/ros_ws/src
    $ catkin_create_pkg learning_image_transport roscpp std_msgs cv_bridge image_transport sensor_msgs 
    

    然后在功能包learning_image_transport下的src目录中建立两个cpp文件:

    $ cd ~/ros_ws/src/learning_image_transport/src/
    $ gedit my_publisher.cpp
    

    <br />

    然后在功能包learning_image_transport下的src目录中建立两个cpp文件:

    $ cd ~/ros_ws/src/learning_image_transport/src/
    $ gedit my_publisher.cpp
    

    将下列代码复制进去:

    #include <ros/ros.h>  
    #include <image_transport/image_transport.h>  
    #include <opencv2/highgui/highgui.hpp>  
    #include <cv_bridge/cv_bridge.h>  
    #include <sstream> // for converting the command line parameter to integer  
    
    int main(int argc, char** argv)  
    {  
        // Check if video source has been passed as a parameter  
        if(argv[1] == NULL)   
        {  
            ROS_INFO("argv[1]=NULL\n");  
            return 1;  
        }  
    
        ros::init(argc, argv, "image_publisher");  
        ros::NodeHandle nh;  
        image_transport::ImageTransport it(nh);  
        image_transport::Publisher pub = it.advertise("camera/image", 1);  
    
        // Convert the passed as command line parameter index for the video device to an integer  
        std::istringstream video_sourceCmd(argv[1]);  
        int video_source;  
        // Check if it is indeed a number  
        if(!(video_sourceCmd >> video_source))   
        {  
            ROS_INFO("video_sourceCmd is %d\n",video_source);  
            return 1;  
        }  
    
        cv::VideoCapture cap(video_source);  
        // Check if video device can be opened with the given index  
        if(!cap.isOpened())   
        {  
            ROS_INFO("can not opencv video device\n");  
            return 1;  
        }  
        cv::Mat frame;  
        sensor_msgs::ImagePtr msg;  
    
        ros::Rate loop_rate(5);  
        while (nh.ok()) 
        {  
            cap >> frame;  
            // Check if grabbed frame is actually full with some content  
            if(!frame.empty()) 
            {  
                msg = cv_bridge::CvImage(std_msgs::Header(), "bgr8", frame).toImageMsg();  
                pub.publish(msg);  
                //cv::Wait(1);  
        	}  
        }
        
        ros::spinOnce();  
        loop_rate.sleep();  
    }  
    

    <br />

    保存以后,继续创建my_subscriber.cpp:

    $ gedit my_subscriber.cpp
    

    复制下列代码:

    #include <ros/ros.h>  
    #include <image_transport/image_transport.h>  
    #include <opencv2/highgui/highgui.hpp>  
    #include <cv_bridge/cv_bridge.h>  
    
    void imageCallback(const sensor_msgs::ImageConstPtr& msg)  
    {  
    	try  
    	{  
    		cv::imshow("view", cv_bridge::toCvShare(msg, "bgr8")->image); 
    		// cv::waitKey(30);  
    	}  
    	catch (cv_bridge::Exception& e)  
    	{  
    		ROS_ERROR("Could not convert from '%s' to 'bgr8'.", msg->encoding.c_str());  
    	}  
    }  
    
    int main(int argc, char **argv)  
    {  
    	ros::init(argc, argv, "image_listener");  
    	ros::NodeHandle nh;  
    	cv::namedWindow("view");  
    	cv::startWindowThread();  
    	image_transport::ImageTransport it(nh);  
    	image_transport::Subscriber sub = it.subscribe("camera/image", 1,imageCallback);  
    	ros::spin();  
    	cv::destroyWindow("view");  
    }  
    

    <br />

    接下来要把涉及到的各种包和opencv在CMakeList中声明一下,回到程序包目录下。

    $ cd ~/ros_ws/src/learning_image_transport/
    $ gedit CMakeLists.txt
    

    添加以下语句:

    find_package(OpenCV REQUIRED)  
    # add the publisher example  
    add_executable(my_publisher src/my_publisher.cpp)  
    
    target_link_libraries(my_publisher ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})  
    
    # add the subscriber example  
    add_executable(my_subscriber src/my_subscriber.cpp)  
    target_link_libraries(my_subscriber ${catkin_LIBRARIES} ${OpenCV_LIBRARIES}) 
    

    将这个包进行编译:

    $ cd ~/ros_ws/
    $ catkin_make  
    

    <br />

    接下来开始运行程序,首先启动ROS。

    $ roscore 
    

    运行my_publisher节点.(如果运行不起来,需要先source devel/setup.bash)。

    $ rosrun learning_image_transport my_publisher 0 
    

    这时候会看到我们的摄像头灯已经亮起来了,0代表默认摄像头,如果有多个摄像头,则第二个是1,依次类推。

    接下来运行my_subscriber节点来接收图像。

    $ rosrun learning_image_transport my_subscriber
    

    这时候如果没有错误的话就会弹出图像窗口,如下所示:

    <br />

    参考:

    ROS-USB摄像头]

    ROS学习笔记(一):在ROS中使用USB网络摄像头传输图像

    <br />

    展开全文
  • 看完了古月居的ros教学视频后又来看看中科院的ros视频视频,在看博客的时候有人把古月居的21讲做成了简单的博客,感觉很赞,所以我也模仿着做。希望对初学者有帮助。大家一起共同进步! 1、机器人相关的背景..

    视频链接:

    中科院软件所-机器人操作系统入门(ROS入门教程)_哔哩哔哩_bilibili

    中科院软件所-机器人操作系统入门(ROS入门教程)_哔哩哔哩_bilibili

    另外有一个不错的 学习网址:
    http://www.autolabor.com.cn/book/ROSTutorials

    本文是截图和文字大部分摘抄自网络,如果有侵权请联系及时删除!

    看完了古月居的ros教学视频后,又来看看中科院的ros视频视频,在看博客的时候有人把古月居的21讲做成了简单的博客,感觉很赞,所以我也模仿着做。希望对初学者有帮助。大家一起共同进步!

    1、机器人相关的背景介绍

    这里省略

    2、ros起源,版本介绍

    ros起源,这里省略

    ros是什么:机器人软件系统架构,框架+工具+功能+社区。

    框架:分布式+进程管理+进程间通信

    ros中的节点(Node)类似进程,在ros中我们一般不说进程,一般说节点这概念,如果有人告诉你我这个机器人跑起来启动7、8个节点,那就是说有七八个进程在运行。

    分布式架构好处,扩展性好,软件复用率高,比如更改雷达,只有更改雷达节点就可以了。

    工具:rviz,Gazebo,rqt

    功能:

    社区:

    ros相关的学习网站:

    Documentation - ROS Wiki

    https://github.com/ros

    3、机器人与ros演示

    4、ros安装和配置

    主要使用官方提供的网站按步骤安装就可以了:

    kinetic/Installation/Ubuntu - ROS Wiki

    重德智能开源库(此视频开源库):

    https://github.com/DroidAITech

    https://github.com/DroidAITech/ROS-Academy-for-Beginners

    开发环境使用:roboware studio

    5、Catkin工作空间和编译系统

     

     catkin:ros定制的编译构建系统,对cmake的扩展。

    创建工作空间教程:

    catkin/Tutorials/create_a_workspace - ROS Wiki

    步骤如下:

    $ source /opt/ros/noetic/setup.bash
    
    
    $ mkdir -p ~/catkin_ws/src
    $ cd ~/catkin_ws/
    $ catkin_make
    //$ catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
    
    
    $ source devel/setup.bash
    
    $ echo $ROS_PACKAGE_PATH
    /home/youruser/catkin_ws/src:/opt/ros/kinetic/share

    这里穿插自己的理解

    根据自己的理解,ros工作空间就是类似c++的工程项目名称。只是工作空间有一定的格式要求,实践表明catkin_ws这个文件夹的名称可以自己命名,不一定要用catkin_ws,但src这个文件夹一定要有,并且不可自己命名,也有可能可以自己命名,只是我自己没用对方法。有知道的朋友可以在评论区留言。

    6、功能包

    (1)cmake简单介绍

    如果没有cmake基础的可以去看《cmake实践》 ,好像和《CMake Practice》是同一本书只是不同叫法或者是中英文叫法而已。

    (2)package.xml简单介绍

     

     (3)代码文件

    一般代码文件可以是脚本(shell、Python)或者C++文件。

     package结构示意图:

      package还有有自定义通信格式的文件,包括消息(msg),服务(srv),动作(action)等

      这时候package结构就像下面这样了

      package还有launch文件,配置文件(yaml)。launch用于每次可以运行多个可执行文件。

     

      这时候package结构图如下

    总体框架(视频缺少config文件,我添加上去了) 

     (4)常用指令

     7、操作演示,catkin工作空间探索

    安装一个比较好用的,查看代码层次的工具:tree

     sudo apt-get install tree

     可以直接使用tree,这时候将列出所有的文件,这里只复制了一部分没有全部复制完。

    $ tree
    .
    ├── build
    │   ├── atomic_configure
    │   │   ├── env.sh
    │   │   ├── local_setup.bash
    │   │   ├── local_setup.sh
    │   │   ├── local_setup.zsh
    │   │   ├── setup.bash
    │   │   ├── setup.sh
    │   │   ├── _setup_util.py
    │   │   └── setup.zsh
    │   ├── catkin
    │   │   └── catkin_generated
    │   │       └── version
    │   │           └── package.cmake
    

    如果只想看展开一层的文件夹可以用 tree -L 1,这里就不详细列出来,可以用tree --help查看tree的使用方法

    $ tree -L 1
    .
    ├── build
    ├── devel
    └── src
    
    $ tree --help
    usage: tree [-acdfghilnpqrstuvxACDFJQNSUX] [-H baseHREF] [-T title ]
    	[-L level [-R]] [-P pattern] [-I pattern] [-o filename] [--version]
    	[--help] [--inodes] [--device] [--noreport] [--nolinks] [--dirsfirst]
    	[--charset charset] [--filelimit[=]#] [--si] [--timefmt[=]<f>]
    	[--sort[=]<name>] [--matchdirs] [--ignore-case] [--] [<directory list>]
      ------- Listing options -------
      -a            All files are listed.
      -d            List directories only.
      -l            Follow symbolic links like directories.
      -f            Print the full path prefix for each file.
      -x            Stay on current filesystem only.
      -L level      Descend only level directories deep.
      -R            Rerun tree when max dir level reached.
      -P pattern    List only those files that match the pattern given.
      -I pattern    Do not list files that match the given pattern.
      --ignore-case Ignore case when pattern matching.
      --matchdirs   Include directory names in -P pattern matching.
      --noreport    Turn off file/directory count at end of tree listing.
      --charset X   Use charset X for terminal/HTML and indentation line output.
      --filelimit # Do not descend dirs with more than # files in them.
      --timefmt <f> Print and format time according to the format <f>.
      -o filename   Output to file instead of stdout.
      -------- File options ---------
      -q            Print non-printable characters as '?'.
      -N            Print non-printable characters as is.
      -Q            Quote filenames with double quotes.
      -p            Print the protections for each file.
      -u            Displays file owner or UID number.
      -g            Displays file group owner or GID number.
      -s            Print the size in bytes of each file.
      -h            Print the size in a more human readable way.
      --si          Like -h, but use in SI units (powers of 1000).
      -D            Print the date of last modification or (-c) status change.
      -F            Appends '/', '=', '*', '@', '|' or '>' as per ls -F.
      --inodes      Print inode number of each file.
      --device      Print device ID number to which each file belongs.
      ------- Sorting options -------
      -v            Sort files alphanumerically by version.
      -t            Sort files by last modification time.
      -c            Sort files by last status change time.
      -U            Leave files unsorted.
      -r            Reverse the order of the sort.
      --dirsfirst   List directories before files (-U disables).
      --sort X      Select sort: name,version,size,mtime,ctime.
      ------- Graphics options ------
      -i            Don't print indentation lines.
      -A            Print ANSI lines graphic indentation lines.
      -S            Print with CP437 (console) graphics indentation lines.
      -n            Turn colorization off always (-C overrides).
      -C            Turn colorization on always.
      ------- XML/HTML/JSON options -------
      -X            Prints out an XML representation of the tree.
      -J            Prints out an JSON representation of the tree.
      -H baseHREF   Prints out HTML format with baseHREF as top directory.
      -T string     Replace the default HTML title and H1 header with string.
      --nolinks     Turn off hyperlinks in HTML output.
      ---- Miscellaneous options ----
      --version     Print version and exit.
      --help        Print usage and this help message and exit.
      --            Options processing terminator.
    
    
    

      8 P10 master和node

     master相当一个管家,用来管理各个节点

    master管理node之间的通讯示意图

     启动roscore

     节点相当一个个程序

     node启动命令

    ros提供了启动多个节点的方法:roslaunch

     launch文件书写规则

     pr2机器人要启动的节点

    9 P11 操作演示

    (1)克隆或下载ROS-Academy-for-Beginners教学包到工作空间的/src目录下,例如 ~/catkin_ws/src

    $ mkdir -p ~/catkin_ws/src
    $ cd ~/catkin_ws/src
    $ git clone https://github.com/DroidAITech/ROS-Academy-for-Beginners.git
    

    (2)安装教学包所需的依赖(如果不成功可以直接跳到第三步)

    $ cd ~/catkin_ws
    $ rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y

    (3)编译并刷新环境

    $ catkin_make
    $ source ~/catkin_ws/devel/setup.bash

    其中(1)(2)(3)是视频中的步骤,但我根据这个步骤,在第2个不知就是不成功,不清楚为什么不成功。

    所以就自己安装依赖了。具体见我另一篇博文链接:

    controller_managerConfig move_baseConfig gmappingConfig hector_mappingConfig ros编译错误汇总 重德智能_lxj362343的博客-CSDN博客

    也就是说第二步不成功没事直接跳到第3步,遇到什么问题具体解决问题。

    (4)升级Gazebo,请查看我的另一篇博文

    https://blog.csdn.net/lxj362343/article/details/119415719

    (5)运行仿真

    $ roslaunch robot_sim_demo robot_spawn.launch 

    运行后可以看到仿真环境 

     在终端中可以看到日志中输出一些信息,其中有parameters是参数服务器,可以看到启动了很多参数服务器

     另外还可以看到有一些node,这些就是节点 

    还可以看到一些进程(process)相关的信息,比如rosout-1,比如master,gazebo-2等等

     可以使用命令查看一些信息:

    #查看节点信息
    $ rosnode list    
    /gazebo
    /gazebo_gui
    /mobile_base_nodelet_manager
    /rosout
    /xbot/robot_state_publisher
    
    

    但是这个时候会有红色的报错

    [ERROR] [1632062295.893197079]: Failed to load nodelet [/cmd_vel_mux] of type [yocs_cmd_vel_mux/CmdVelMuxNodelet] even after refreshing the cache: According to the loaded plugin descriptions the class yocs_cmd_vel_mux/CmdVelMuxNodelet with base class type nodelet::Nodelet does not exist. Declared types are  SlamGMappingNodelet depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image nodelet_tutorial_math/Plus pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid stereo_image_proc/disparity stereo_image_proc/point_cloud2
    [ERROR] [1632062295.893287483]: The error before refreshing the cache was: According to the loaded plugin descriptions the class yocs_cmd_vel_mux/CmdVelMuxNodelet with base class type nodelet::Nodelet does not exist. Declared types are  SlamGMappingNodelet depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image nodelet_tutorial_math/Plus pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid stereo_image_proc/disparity stereo_image_proc/point_cloud2
    [FATAL] [1632062295.922054614]: Failed to load nodelet '/cmd_vel_mux` of type `yocs_cmd_vel_mux/CmdVelMuxNodelet` to manager `mobile_base_nodelet_manager'
    [cmd_vel_mux-8] process has died [pid 19393, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load yocs_cmd_vel_mux/CmdVelMuxNodelet mobile_base_nodelet_manager cmd_vel_mux/output/cmd_vel:=cmd_vel __name:=cmd_vel_mux 

     遇到这个 不用慌,安装一些东西,这个要感谢一个博主文章:

    https://blog.csdn.net/ldk3679/article/details/105652014/

    以下是安装的指令 

    sudo apt-get install ros-kinetic-yocs-cmd-vel-mux

    查看rostopic:
     

    $rostopic list
    
    #可以看到有以下topic
    
    /camera/depth/camera_info
    /camera/depth/image_raw
    /camera/depth/points
    /camera/parameter_descriptions
    /camera/parameter_updates
    /camera/rgb/camera_info
    /camera/rgb/image_raw
    /camera/rgb/image_raw/compressed
    /camera/rgb/image_raw/compressed/parameter_descriptions
    /camera/rgb/image_raw/compressed/parameter_updates
    /camera/rgb/image_raw/compressedDepth
    /camera/rgb/image_raw/compressedDepth/parameter_descriptions
    /camera/rgb/image_raw/compressedDepth/parameter_updates
    /camera/rgb/image_raw/theora
    /camera/rgb/image_raw/theora/parameter_descriptions
    /camera/rgb/image_raw/theora/parameter_updates
    /clock
    /cmd_vel
    /cmd_vel_mux/active
    /cmd_vel_mux/input/avoid
    /cmd_vel_mux/input/navi
    /cmd_vel_mux/input/safety_controller
    /cmd_vel_mux/input/switch
    /cmd_vel_mux/input/teleop
    /cmd_vel_mux/parameter_descriptions
    /cmd_vel_mux/parameter_updates
    /gazebo/link_states
    /gazebo/model_states
    /gazebo/parameter_descriptions
    /gazebo/parameter_updates
    /gazebo/set_link_state
    /gazebo/set_model_state
    /gazebo_gui/parameter_descriptions
    /gazebo_gui/parameter_updates
    /imu
    /joint_states
    /mobile_base_nodelet_manager/bond
    /odom
    /rosout
    /rosout_agg
    /scan
    /tf
    /tf_static
    /xbot/joint_states

    $ rostopic info /camera/rgb/image_raw //查看image_raw这个话题信息
    Type: sensor_msgs/Image
    
    Publishers: 
     * /gazebo (http://ubuntu:37624/) //发布者
    
    Subscribers: None //代表无人接收/camera/rgb/image_raw

     运行指令

    $rosrun image_view image_view image:=/camera/rgb/image_raw

    弹出rgb图像信息

    $ rostopic info /camera/depth/image_raw 
    Type: sensor_msgs/Image
    
    Publishers: 
     * /gazebo (http://ubuntu:37624/)
    
    Subscribers: None
    

     输入以下指令可以查看深度图 

    $ rosrun image_view image_view image:=/camera/depth/image_raw
    

     运行键盘控制程序:

    $ rosrun robot_sim_demo robot_keyboard_teleop.py 
    
    Control The Robot!
    ---------------------------
    Moving around:
       u    i    o
       j    k    l
       m    ,    .
    
    q/z : increase/decrease max speeds by 10%
    w/x : increase/decrease only linear speed by 10%
    e/c : increase/decrease only angular speed by 10%
    space key, k : force stop
    anything else : stop smoothly
    
    CTRL-C to quit

    这个和视频中说的使用键盘的上下左右键去控制机器人不太一样,因为提示有说是使用

       u    i    o
       j    k    l
       m    ,    .
    q/z : increase/decrease max speeds by 10%
    w/x : increase/decrease only linear speed by 10%
    e/c : increase/decrease only angular speed by 10%
     这几个按键来控制的,这个需要注意下。

    先使用 rosnode list查看都有哪些节点。

    $ rosnode list
    /cmd_vel_mux
    /gazebo
    /gazebo_gui
    /image_view_1632069293357719777
    /mobile_base_nodelet_manager
    /robot_teleop
    /rosout
    /xbot/robot_state_publisher

    接下来运行:rosnode info /mobile_base_nodelet_manager ,这个和视频有点不一样,视频运行的是:rosnode info /teleop_twist_keyboard,看弹幕说的是在mobile分支已经变了,有可能我用的分支不对,后面在来看这个问题吧

    $ rosnode info /mobile_base_nodelet_manager 
    --------------------------------------------------------------------------------
    Node [/mobile_base_nodelet_manager]
    Publications: 
     * /cmd_vel [geometry_msgs/Twist]
     * /cmd_vel_mux/active [std_msgs/String]
     * /cmd_vel_mux/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
     * /cmd_vel_mux/parameter_updates [dynamic_reconfigure/Config]
     * /mobile_base_nodelet_manager/bond [bond/Status]
     * /rosout [rosgraph_msgs/Log]
    
    Subscriptions: 
     * /clock [rosgraph_msgs/Clock]
     * /cmd_vel_mux/input/avoid [unknown type]
     * /cmd_vel_mux/input/navi [unknown type]
     * /cmd_vel_mux/input/safety_controller [unknown type]
     * /cmd_vel_mux/input/switch [unknown type]
     * /cmd_vel_mux/input/teleop [geometry_msgs/Twist]
     * /mobile_base_nodelet_manager/bond [bond/Status]
    
    Services: 
     * /cmd_vel_mux/set_parameters
     * /mobile_base_nodelet_manager/get_loggers
     * /mobile_base_nodelet_manager/list
     * /mobile_base_nodelet_manager/load_nodelet
     * /mobile_base_nodelet_manager/set_logger_level
     * /mobile_base_nodelet_manager/unload_nodelet
    
    
    contacting node http://ubuntu:44121/ ...
    Pid: 20777
    Connections:
     * topic: /rosout
        * to: /rosout
        * direction: outbound
        * transport: TCPROS
     * topic: /cmd_vel
        * to: /gazebo
        * direction: outbound
        * transport: TCPROS
     * topic: /mobile_base_nodelet_manager/bond
        * to: /mobile_base_nodelet_manager
        * direction: outbound
        * transport: INTRAPROCESS
     * topic: /mobile_base_nodelet_manager/bond
        * to: /cmd_vel_mux
        * direction: outbound
        * transport: TCPROS
     * topic: /clock
        * to: /gazebo (http://ubuntu:37624/)
        * direction: inbound
        * transport: TCPROS
     * topic: /cmd_vel_mux/input/teleop
        * to: /robot_teleop (http://ubuntu:40729/)
        * direction: inbound
        * transport: TCPROS
     * topic: /mobile_base_nodelet_manager/bond
        * to: /mobile_base_nodelet_manager (http://ubuntu:44121/)
        * direction: inbound
        * transport: INTRAPROCESS
     * topic: /mobile_base_nodelet_manager/bond
        * to: /cmd_vel_mux (http://ubuntu:32890/)
        * direction: inbound
        * transport: TCPROS
    
    $ rostopic info /cmd_vel
    Type: geometry_msgs/Twist
    
    Publishers: 
     * /mobile_base_nodelet_manager (http://ubuntu:44121/)
    
    Subscribers: 
     * /gazebo (http://ubuntu:37624/)
    

    查看速度具体控制内容:

    $ rostopic echo /cmd_vel
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
    ---
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
    ---
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    

    查看具体定义:

    $ rosmsg show geometry_msgs/Twist
    geometry_msgs/Vector3 linear
      float64 x
      float64 y
      float64 z
    geometry_msgs/Vector3 angular
      float64 x
      float64 y
      float64 z
    

     查看所有的消息

    $ rosmsg list 
    action_demo/DoDishesAction
    action_demo/DoDishesActionFeedback
    action_demo/DoDishesActionGoal
    action_demo/DoDishesActionResult
    action_demo/DoDishesFeedback
    action_demo/DoDishesGoal
    action_demo/DoDishesResult
    actionlib/TestAction
    actionlib/TestActionFeedback
    actionlib/TestActionGoal
    actionlib/TestActionResult
    actionlib/TestFeedback
    actionlib/TestGoal
    actionlib/TestRequestAction
    actionlib/TestRequestActionFeedback
    actionlib/TestRequestActionGoal
    actionlib/TestRequestActionResult
    actionlib/TestRequestFeedback
    actionlib/TestRequestGoal
    actionlib/TestRequestResult
    actionlib/TestResult
    actionlib/TwoIntsAction
    actionlib/TwoIntsActionFeedback
    actionlib/TwoIntsActionGoal
    actionlib/TwoIntsActionResult
    actionlib/TwoIntsFeedback
    actionlib/TwoIntsGoal
    actionlib/TwoIntsResult
    actionlib_msgs/GoalID
    actionlib_msgs/GoalStatus
    actionlib_msgs/GoalStatusArray
    actionlib_tutorials/AveragingAction
    actionlib_tutorials/AveragingActionFeedback
    actionlib_tutorials/AveragingActionGoal
    actionlib_tutorials/AveragingActionResult
    actionlib_tutorials/AveragingFeedback
    actionlib_tutorials/AveragingGoal
    actionlib_tutorials/AveragingResult
    actionlib_tutorials/FibonacciAction
    actionlib_tutorials/FibonacciActionFeedback
    actionlib_tutorials/FibonacciActionGoal
    actionlib_tutorials/FibonacciActionResult
    actionlib_tutorials/FibonacciFeedback
    actionlib_tutorials/FibonacciGoal
    actionlib_tutorials/FibonacciResult
    base_local_planner/Position2DInt
    bond/Constants
    bond/Status
    control_msgs/FollowJointTrajectoryAction
    control_msgs/FollowJointTrajectoryActionFeedback
    control_msgs/FollowJointTrajectoryActionGoal
    control_msgs/FollowJointTrajectoryActionResult
    control_msgs/FollowJointTrajectoryFeedback
    control_msgs/FollowJointTrajectoryGoal
    control_msgs/FollowJointTrajectoryResult
    control_msgs/GripperCommand
    control_msgs/GripperCommandAction
    control_msgs/GripperCommandActionFeedback
    control_msgs/GripperCommandActionGoal
    control_msgs/GripperCommandActionResult
    control_msgs/GripperCommandFeedback
    control_msgs/GripperCommandGoal
    control_msgs/GripperCommandResult
    control_msgs/JointControllerState
    control_msgs/JointJog
    control_msgs/JointTolerance
    control_msgs/JointTrajectoryAction
    control_msgs/JointTrajectoryActionFeedback
    control_msgs/JointTrajectoryActionGoal
    control_msgs/JointTrajectoryActionResult
    control_msgs/JointTrajectoryControllerState
    control_msgs/JointTrajectoryFeedback
    control_msgs/JointTrajectoryGoal
    control_msgs/JointTrajectoryResult
    control_msgs/PidState
    control_msgs/PointHeadAction
    control_msgs/PointHeadActionFeedback
    control_msgs/PointHeadActionGoal
    control_msgs/PointHeadActionResult
    control_msgs/PointHeadFeedback
    control_msgs/PointHeadGoal
    control_msgs/PointHeadResult
    control_msgs/SingleJointPositionAction
    control_msgs/SingleJointPositionActionFeedback
    control_msgs/SingleJointPositionActionGoal
    control_msgs/SingleJointPositionActionResult
    control_msgs/SingleJointPositionFeedback
    control_msgs/SingleJointPositionGoal
    control_msgs/SingleJointPositionResult
    controller_manager_msgs/ControllerState
    controller_manager_msgs/ControllerStatistics
    controller_manager_msgs/ControllersStatistics
    controller_manager_msgs/HardwareInterfaceResources
    costmap_2d/VoxelGrid
    diagnostic_msgs/DiagnosticArray
    diagnostic_msgs/DiagnosticStatus
    diagnostic_msgs/KeyValue
    dynamic_reconfigure/BoolParameter
    dynamic_reconfigure/Config
    dynamic_reconfigure/ConfigDescription
    dynamic_reconfigure/DoubleParameter
    dynamic_reconfigure/Group
    dynamic_reconfigure/GroupState
    dynamic_reconfigure/IntParameter
    dynamic_reconfigure/ParamDescription
    dynamic_reconfigure/SensorLevels
    dynamic_reconfigure/StrParameter
    gazebo_msgs/ContactState
    gazebo_msgs/ContactsState
    gazebo_msgs/LinkState
    gazebo_msgs/LinkStates
    gazebo_msgs/ModelState
    gazebo_msgs/ModelStates
    gazebo_msgs/ODEJointProperties
    gazebo_msgs/ODEPhysics
    gazebo_msgs/PerformanceMetrics
    gazebo_msgs/SensorPerformanceMetric
    gazebo_msgs/WorldState
    geometry_msgs/Accel
    geometry_msgs/AccelStamped
    geometry_msgs/AccelWithCovariance
    geometry_msgs/AccelWithCovarianceStamped
    geometry_msgs/Inertia
    geometry_msgs/InertiaStamped
    geometry_msgs/Point
    geometry_msgs/Point32
    geometry_msgs/PointStamped
    geometry_msgs/Polygon
    geometry_msgs/PolygonStamped
    geometry_msgs/Pose
    geometry_msgs/Pose2D
    geometry_msgs/PoseArray
    geometry_msgs/PoseStamped
    geometry_msgs/PoseWithCovariance
    geometry_msgs/PoseWithCovarianceStamped
    geometry_msgs/Quaternion
    geometry_msgs/QuaternionStamped
    geometry_msgs/Transform
    geometry_msgs/TransformStamped
    geometry_msgs/Twist
    geometry_msgs/TwistStamped
    geometry_msgs/TwistWithCovariance
    geometry_msgs/TwistWithCovarianceStamped
    geometry_msgs/Vector3
    geometry_msgs/Vector3Stamped
    geometry_msgs/Wrench
    geometry_msgs/WrenchStamped
    hector_mapping/HectorDebugInfo
    hector_mapping/HectorIterData
    map_msgs/OccupancyGridUpdate
    map_msgs/PointCloud2Update
    map_msgs/ProjectedMap
    map_msgs/ProjectedMapInfo
    move_base_msgs/MoveBaseAction
    move_base_msgs/MoveBaseActionFeedback
    move_base_msgs/MoveBaseActionGoal
    move_base_msgs/MoveBaseActionResult
    move_base_msgs/MoveBaseFeedback
    move_base_msgs/MoveBaseGoal
    move_base_msgs/MoveBaseResult
    move_base_msgs/RecoveryStatus
    moveit_msgs/AllowedCollisionEntry
    moveit_msgs/AllowedCollisionMatrix
    moveit_msgs/AttachedCollisionObject
    moveit_msgs/BoundingVolume
    moveit_msgs/CollisionObject
    moveit_msgs/ConstraintEvalResult
    moveit_msgs/Constraints
    moveit_msgs/ContactInformation
    moveit_msgs/CostSource
    moveit_msgs/DisplayRobotState
    moveit_msgs/DisplayTrajectory
    moveit_msgs/ExecuteTrajectoryAction
    moveit_msgs/ExecuteTrajectoryActionFeedback
    moveit_msgs/ExecuteTrajectoryActionGoal
    moveit_msgs/ExecuteTrajectoryActionResult
    moveit_msgs/ExecuteTrajectoryFeedback
    moveit_msgs/ExecuteTrajectoryGoal
    moveit_msgs/ExecuteTrajectoryResult
    moveit_msgs/Grasp
    moveit_msgs/GripperTranslation
    moveit_msgs/JointConstraint
    moveit_msgs/JointLimits
    moveit_msgs/KinematicSolverInfo
    moveit_msgs/LinkPadding
    moveit_msgs/LinkScale
    moveit_msgs/MotionPlanDetailedResponse
    moveit_msgs/MotionPlanRequest
    moveit_msgs/MotionPlanResponse
    moveit_msgs/MoveGroupAction
    moveit_msgs/MoveGroupActionFeedback
    moveit_msgs/MoveGroupActionGoal
    moveit_msgs/MoveGroupActionResult
    moveit_msgs/MoveGroupFeedback
    moveit_msgs/MoveGroupGoal
    moveit_msgs/MoveGroupResult
    moveit_msgs/MoveItErrorCodes
    moveit_msgs/ObjectColor
    moveit_msgs/OrientationConstraint
    moveit_msgs/OrientedBoundingBox
    moveit_msgs/PickupAction
    moveit_msgs/PickupActionFeedback
    moveit_msgs/PickupActionGoal
    moveit_msgs/PickupActionResult
    moveit_msgs/PickupFeedback
    moveit_msgs/PickupGoal
    moveit_msgs/PickupResult
    moveit_msgs/PlaceAction
    moveit_msgs/PlaceActionFeedback
    moveit_msgs/PlaceActionGoal
    moveit_msgs/PlaceActionResult
    moveit_msgs/PlaceFeedback
    moveit_msgs/PlaceGoal
    moveit_msgs/PlaceLocation
    moveit_msgs/PlaceResult
    moveit_msgs/PlannerInterfaceDescription
    moveit_msgs/PlannerParams
    moveit_msgs/PlanningOptions
    moveit_msgs/PlanningScene
    moveit_msgs/PlanningSceneComponents
    moveit_msgs/PlanningSceneWorld
    moveit_msgs/PositionConstraint
    moveit_msgs/PositionIKRequest
    moveit_msgs/RobotState
    moveit_msgs/RobotTrajectory
    moveit_msgs/TrajectoryConstraints
    moveit_msgs/VisibilityConstraint
    moveit_msgs/WorkspaceParameters
    msgs_demo/AddTwoIntsAction
    msgs_demo/AddTwoIntsActionFeedback
    msgs_demo/AddTwoIntsActionGoal
    msgs_demo/AddTwoIntsActionResult
    msgs_demo/AddTwoIntsFeedback
    msgs_demo/AddTwoIntsGoal
    msgs_demo/AddTwoIntsResult
    msgs_demo/AutoDockingAction
    msgs_demo/AutoDockingActionFeedback
    msgs_demo/AutoDockingActionGoal
    msgs_demo/AutoDockingActionResult
    msgs_demo/AutoDockingFeedback
    msgs_demo/AutoDockingGoal
    msgs_demo/AutoDockingResult
    msgs_demo/GetMapAction
    msgs_demo/GetMapActionFeedback
    msgs_demo/GetMapActionGoal
    msgs_demo/GetMapActionResult
    msgs_demo/GetMapFeedback
    msgs_demo/GetMapGoal
    msgs_demo/GetMapResult
    msgs_demo/MoveBaseAction
    msgs_demo/MoveBaseActionFeedback
    msgs_demo/MoveBaseActionGoal
    msgs_demo/MoveBaseActionResult
    msgs_demo/MoveBaseFeedback
    msgs_demo/MoveBaseGoal
    msgs_demo/MoveBaseResult
    msgs_demo/Accel
    msgs_demo/Echos
    msgs_demo/Imu
    msgs_demo/LaserScan
    msgs_demo/Odometry
    msgs_demo/Point
    msgs_demo/Pose
    msgs_demo/PoseStamped
    msgs_demo/PoseWithCovariance
    msgs_demo/Power
    msgs_demo/Quaternion
    msgs_demo/Twist
    msgs_demo/TwistWithCovariance
    msgs_demo/Vector3
    nav_msgs/GetMapAction
    nav_msgs/GetMapActionFeedback
    nav_msgs/GetMapActionGoal
    nav_msgs/GetMapActionResult
    nav_msgs/GetMapFeedback
    nav_msgs/GetMapGoal
    nav_msgs/GetMapResult
    nav_msgs/GridCells
    nav_msgs/MapMetaData
    nav_msgs/OccupancyGrid
    nav_msgs/Odometry
    nav_msgs/Path
    object_recognition_msgs/ObjectInformation
    object_recognition_msgs/ObjectRecognitionAction
    object_recognition_msgs/ObjectRecognitionActionFeedback
    object_recognition_msgs/ObjectRecognitionActionGoal
    object_recognition_msgs/ObjectRecognitionActionResult
    object_recognition_msgs/ObjectRecognitionFeedback
    object_recognition_msgs/ObjectRecognitionGoal
    object_recognition_msgs/ObjectRecognitionResult
    object_recognition_msgs/ObjectType
    object_recognition_msgs/RecognizedObject
    object_recognition_msgs/RecognizedObjectArray
    object_recognition_msgs/Table
    object_recognition_msgs/TableArray
    octomap_msgs/Octomap
    octomap_msgs/OctomapWithPose
    pcl_msgs/ModelCoefficients
    pcl_msgs/PointIndices
    pcl_msgs/PolygonMesh
    pcl_msgs/Vertices
    roscpp/Logger
    rosgraph_msgs/Clock
    rosgraph_msgs/Log
    rosgraph_msgs/TopicStatistics
    rospy_tutorials/Floats
    rospy_tutorials/HeaderString
    sensor_msgs/BatteryState
    sensor_msgs/CameraInfo
    sensor_msgs/ChannelFloat32
    sensor_msgs/CompressedImage
    sensor_msgs/FluidPressure
    sensor_msgs/Illuminance
    sensor_msgs/Image
    sensor_msgs/Imu
    sensor_msgs/JointState
    sensor_msgs/Joy
    sensor_msgs/JoyFeedback
    sensor_msgs/JoyFeedbackArray
    sensor_msgs/LaserEcho
    sensor_msgs/LaserScan
    sensor_msgs/MagneticField
    sensor_msgs/MultiDOFJointState
    sensor_msgs/MultiEchoLaserScan
    sensor_msgs/NavSatFix
    sensor_msgs/NavSatStatus
    sensor_msgs/PointCloud
    sensor_msgs/PointCloud2
    sensor_msgs/PointField
    sensor_msgs/Range
    sensor_msgs/RegionOfInterest
    sensor_msgs/RelativeHumidity
    sensor_msgs/Temperature
    sensor_msgs/TimeReference
    shape_msgs/Mesh
    shape_msgs/MeshTriangle
    shape_msgs/Plane
    shape_msgs/SolidPrimitive
    smach_msgs/SmachContainerInitialStatusCmd
    smach_msgs/SmachContainerStatus
    smach_msgs/SmachContainerStructure
    std_msgs/Bool
    std_msgs/Byte
    std_msgs/ByteMultiArray
    std_msgs/Char
    std_msgs/ColorRGBA
    std_msgs/Duration
    std_msgs/Empty
    std_msgs/Float32
    std_msgs/Float32MultiArray
    std_msgs/Float64
    std_msgs/Float64MultiArray
    std_msgs/Header
    std_msgs/Int16
    std_msgs/Int16MultiArray
    std_msgs/Int32
    std_msgs/Int32MultiArray
    std_msgs/Int64
    std_msgs/Int64MultiArray
    std_msgs/Int8
    std_msgs/Int8MultiArray
    std_msgs/MultiArrayDimension
    std_msgs/MultiArrayLayout
    std_msgs/String
    std_msgs/Time
    std_msgs/UInt16
    std_msgs/UInt16MultiArray
    std_msgs/UInt32
    std_msgs/UInt32MultiArray
    std_msgs/UInt64
    std_msgs/UInt64MultiArray
    std_msgs/UInt8
    std_msgs/UInt8MultiArray
    stereo_msgs/DisparityImage
    tf/tfMessage
    tf2_msgs/LookupTransformAction
    tf2_msgs/LookupTransformActionFeedback
    tf2_msgs/LookupTransformActionGoal
    tf2_msgs/LookupTransformActionResult
    tf2_msgs/LookupTransformFeedback
    tf2_msgs/LookupTransformGoal
    tf2_msgs/LookupTransformResult
    tf2_msgs/TF2Error
    tf2_msgs/TFMessage
    theora_image_transport/Packet
    topic_demo/gps
    trajectory_msgs/JointTrajectory
    trajectory_msgs/JointTrajectoryPoint
    trajectory_msgs/MultiDOFJointTrajectory
    trajectory_msgs/MultiDOFJointTrajectoryPoint
    turtle_actionlib/ShapeAction
    turtle_actionlib/ShapeActionFeedback
    turtle_actionlib/ShapeActionGoal
    turtle_actionlib/ShapeActionResult
    turtle_actionlib/ShapeFeedback
    turtle_actionlib/ShapeGoal
    turtle_actionlib/ShapeResult
    turtle_actionlib/Velocity
    turtlesim/Color
    turtlesim/Pose
    visualization_msgs/ImageMarker
    visualization_msgs/InteractiveMarker
    visualization_msgs/InteractiveMarkerControl
    visualization_msgs/InteractiveMarkerFeedback
    visualization_msgs/InteractiveMarkerInit
    visualization_msgs/InteractiveMarkerPose
    visualization_msgs/InteractiveMarkerUpdate
    visualization_msgs/Marker
    visualization_msgs/MarkerArray
    visualization_msgs/MenuEntry
    

    未完待续,学习不停止脚步!由于字数太多,准备放在另外一篇文章了!

    展开全文
  • (二)—— ros 文件系统:Catkin & 工作空间 & ROS功能包 zxxRobot 2020-09-22 14:37:53 336 收藏 6 分类专栏: Ros 版权 Creating a ROS Package Building a ROS Package ROS学习之catkin CMakeList.txt ROS 工作...
  • 请先安装相关的ROS功能包: 安装 gmapping 包(用于构建地图):sudo apt install ros-<ROS版本>-gmapping 安装地图服务包(用于保存与读取地图):sudo apt install ros-<ROS版本>-map-server ...
  • ros学习

    2021-09-29 20:29:24
    ros基础操作 roboware-studio命令打开ros的ide,方便操作 1.海龟控制 roscore 打开ros rosrun turtlesim turtlesim_node 打开乌龟 rosrun turtlesim turtle_teleop_key 打开键盘控制界面 rqt_graph 查看节点图 ...
  • ROS学习笔记

    2021-07-18 16:00:40
    ROS学习入门 笔记第一天教学来源及参考文档ROS通讯机制话题的发布与订阅基础如何改变文本的样式 教学来源及参考文档 链接: 奥特学园. 链接: 文档. ROS通讯机制 话题通信(发布订阅模式) 服务通信(请求响应模式) ...
  • ROS学习

    2021-09-05 15:10:36
    learning ros
  • ROS中的核心概念 1.通信机制 2.节点与节点管理器 2.1节点(Node)—— 执行单元 执行具体任务的进程、独立运行的可执行文件;不同节点可使用不同的编程语言,可分布式运行在不同的主机;节点在系统中的名称...
  • * record thread: record callback(data write) * helper thread: ui(keystroke detection) */ int main(int argc, char* argv[]) { // 初始化ROS ros::init(argc, argv, "voiceRecognition"); ros::NodeHandle n; ...
  • ROS Master中,可以发布与订阅已经定义好的消息,比如海龟的运动、位姿等信息。但有时我们需要自己定义消息的类型。本节主要目的为定义一个Person个人信息,Publisher发布个人信息,Subscriber订阅个人信息。
  • ROS安装 按照官方所给的方法,在使用rosdep init和rosdep update命令时会非常慢,而且经常会失败,即便是科学上网也难以解决。所以我们采用下载源码+修改文件安装地址的方式来进行ROS的安装 具体过程参考ROS安装 ...
  • ROS学习(四)了解ROS主题一、建立1.1 roscore1.2 turtlesim功能包1.3 用键盘控制乌龟二、ROS主题2.1 使用rqt_graph2.2 rostopic介绍2.3 使用rostopic echo2.4 使用rostopic list三、ROS Messages 一、建立 1.1 ...
  • 1、创建 Catkin 工作空间 ...  第一行代码直接创建了第二层级的文件夹 src,这也是我们放 ROS 软件包的地方。第二行代码使得进程进入工作空间,然后再是初始化。注意,catkin_make 命令必须在工作空间的
  • ros学习教程

    2021-06-02 17:38:11
    一、 rospack find roscpp roscd roscpp roscd log 二、ros workspace https://blog.csdn.net/weixin_42237429/article/details/90238000 三、创建ROS软件包
  • Ros学习

    2021-03-10 10:08:11
    Ros学习第11章 ROS与机器学习 第11章 ROS与机器学习 tensorflow2与tensorflow1中的代码冲突 解决办法 import tensorflow as tf tf.compat.v1.disable_eager_execution() X = tf.placeholder(tf.float32)#改为 X = tf...
  • ROS学习-理解ROS话题

    2021-11-14 16:35:08
    首先,与上一个博客类似的:ROS学习-理解ROS节点 使用roscore启动ROS $ roscore 注意,当前只能运行一个roscore,如果上一个博客中没有关闭roscore,那么会提示类似于下述错误信息。 roscore cannot run as another...
  • ROS学习遇到的问题---亲测有效

    千次阅读 2021-07-19 21:54:39
    1.ubuntu下载软件仓库信息失败&...在安装usb-cam freenect 这些ROS package的时候,很多都是无法定位软件源,去换了很多源也是同样的问题。 于是在ROS交流群问了一些大佬,就完美解决了这个问题。 解决方法
  • 安装joint_state_publisher_gui: sudo apt-get install ros-melodic-joint-state-publisher-gui 修改启动文件,将joint_state_publisher替换为joint_state_publisher_gui如下: 修改之后,再启动launch,运行rviz...
  • ROS学习笔记-ROS1和ROS2

    2021-05-05 09:48:24
    ROS1存在的根本问题: 1.无多机器人系统的标准:ROS1中并没有构建多机器人系统的标准方法。 2.平台单一:ROS1基于linux系统,在其他系统中无法安装和使用。 3.实时性差:ROS1缺少实时性方面的设计。 4.稳定性差:ROS...
  • ROS学习笔记#0

    2021-09-07 21:08:58
    ROS学习笔记#0 ** Preface-写在前面 ROSwiki教程网址 感觉可能是我语文的水平退步了挺多,目前现有的ros教程,我接触到的有某月居的,奥特雷柏的,顺便还从学校的图书馆借来了基本ROS有关的书.某月居的课程听下来给我一...
  • ros学习(4)

    2021-07-21 09:34:47
    但是找到一篇博客可以更好的实现无限远程连接,但是在修改文件时又出现了错误,然后找了一个树莓派先试,在进行最后的连接测试的时候发现那个树莓派没有ros环境,给它安装ros时又出错。。。。。然后又去尝试重新...
  • 机器人系统仿真:是通过计算机对实体机器人系统进行模拟的技术,在 ROS 中,仿真实现涉及的内容主要有三:对机器人建模(URDF)、创建仿真环境(Gazebo)以及感知环境(Rviz)等系统性实现。 URDF是 Unified Robot ...
  • ROS学习笔记-ROS+YOLOv4

    2021-06-13 16:53:55
    Yolo v4系列学习(四)Yolo v4移植ROS
  • 可以从上一个博客:ROS学习-记录和回放数据中生成,或者从webviz中下载一个demo 也可以通过下述命令: wget https://open-source-webviz-ui.s3.amazonaws.com/demo.bag 或者,假设我们已经有一个能够运行ROS的系统...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 34,055
精华内容 13,622
关键字:

ros学习