ros wiki learning

这篇博客详细介绍了ROS学习的步骤,包括ROS文件系统、创建ROS包、节点和roscore的使用、ROS消息和服务的理解及应用,还涉及了rosparam、rqt_console、roslaunch的使用,以及如何编写简单的发布者、订阅者、服务和客户端程序。
摘要由CSDN通过智能技术生成

mo1、ROS now includes software for tasks ranging from navigation and localization (SLAM),3D object recognition, action planning, motion control for multi-jointed arms, machine learning and even playing billiards.

2、第一部分的学习按照ros wiki http://wiki.ros.org/ROS/Tutorials
2.1ROS filesystem
rospack allows you to get information about packages.
这里写图片描述
2.2Creating a ROS Package创建一个ROS包
2.2.1创建一个catkin包

(1)首先创建一个catkin工作空间
http://wiki.ros.org/catkin/Tutorials/create_a_workspace
source /opt/ros/indigo/setup.bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ..
catkin_make
source devel/setup.bash
(2)其次创建catkin包
cd ~/catkin_ws/src
catkin_create_pkg beginner_tutorials std_msgs rospy roscpp
(3)Building a catkin workspace and sourcing the setup file
cd ~/catkin_ws
catkin_make
. ~/catkin_ws/devel/setup.bash(这是必须的一步add the workspace to your ROS environment you need to source the generated setup file:)

rospack depends1 rospy(std_msgs roscpp rospy创建的时候的第一个)
rospack depends rospy

2.3 Build a ROS package
Before continuing remember to source your environment setup file if you have not already每次创建ROS包的时候,要先改变一下环境变量。
source /opt/ros/indigo/setup.bash
cd ~/catkin_ws
mkdir build
cd build
cmake ..
make
sudo make install
或者catkin_make

2.4理解ROS节点和roscore, rosnode, and rosrun 等命令行的使用
这里写图片描述

Nodes can publish or subscribe to a Topic. Nodes can also provide or use a Service.
2.4.1常用命令
1、roscore is the first thing you should run when using ROS.
2、rosnode displays information about the ROS nodes that are currently running.
2.1 The rosnode list command lists these active nodes:
rosnode list
2.2 The rosnode info command returns information about a specific node.
rosnode info /rosout
这里写图片描述
3、rosrun allows you to use the package name to directly run a node within a package (without having to know the package path).

$ rosrun [package_name] [node_name]

rosrun turtlesim turtlesim_node
这里写图片描述

这里写图片描述
按Ctrl+c结束进程。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值