ROS介绍

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

rosparam
Commands:
rosparam set rosparam get rosparam load rosparam dump rosparam delete rosparam list
rosservΒιβλιοθήκη Baiduce
services.
A tool for listing and querying ROS
chhong@chhong-Studio-1435:~$ roscd roscpp chhong@chhong-Studio1435:/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp$
4、查看当前路径: $ pwd /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp
Commands:
rosnode ping rosnode list rosnode info rosnode machine particular machine. rosnode kill
roslaunch
Starts ROS nodes locally and remotely via SSH, as well as setting parameters on the parameter server. Launch a file in a package: $ roslaunch package_name file.launch A tool for getting and setting ROS parameters on the parameter server using YAMLencoded files. set parameter get parameter load parameters from file dump parameters to file delete parameter list parameter names
四、ROS常用指令用法
roscore
A collection of nodes and programs that are pre-requisites of a ROS-based system. You must have a roscore running in order for ROS nodes to communicate.
5、直接进入ROS目录: $ roscd chhong@chhong-Studio-1435:/opt/ros/electric/ros$ pwd /opt/ros/electric/ros 6、查询目录内容: $ rosls roscpp_tutorials bin cmake manifest.xml srv 7、下载并安装相关依赖: $ rosdep install turtlesim All required rosdeps installed successfully
五、ROS功能演示
1、查看环境变量: $ echo $ROS_PACKAGE_PATH /home/chhong/ros_workspace:/opt/ros/electric/stacks 2、查询包路径: $ rospack find roscpp /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp 3、快捷进入目录:
使用方法:
$ rospack find [package] $ roscd [package_name [/subdir] ] $ rosls [package [/subdir] ] $ roscreate-pkg [package name] $ rosmake [package] $ rosdep install [package] $ roswtf or roswtf [file] $ rxdeps [options]
Commands:
rosservice list Print information about active services. rosservice node Print the name of the node providing a service. rosservice call Call the service with the given args. rosservice args List the arguments of a service. rosservice type Print the service type. rosservice uri Print the service ROSRPC uri. rosservice find Find services by service type.
rostopic
A tool for displaying debug information about ROS topics,including publishers, subscribers, publishing rate, and messages.
Commands:
rostopic bw Display bandwidth used by topic. rostopic echo Print messages to screen. rostopic hz Display publishing rate of topic. rostopic list Print information about active topics. rostopic pub Publish data to topic. rostopic type Print topic type. rostopic find Find topics by type.
8、编译 $ rosmake beginner_tutorials [ rosmake ] Packages requested are: ['beginner_tutorials'] [ rosmake ] Logging to ... [ rosmake ] Results: [ rosmake ] Built 15 packages with 0 failures. [ rosmake ] Summary output to directory [ rosmake ] /home/chhong/.ros/rosmake/rosmake_output20120511-000234 $ rosdep install rxtools All required rosdeps installed successfully
Usage: $ roscore rosmsg/rossrv Examples:
rosmsg/rossrv displays Message/Service (msg/srv) data structure definitions.
$ rosmsg show -r robot_msgs/Quaternion
一、ROS安装和环境变量的配置
1、ROS的安装 参考文档《Ubuntu下ROS及rgbdslam编译 安装全过程》
2、在/home目录下创建ROS工作目录 $ mkdir ~/ros_workspace 在/home目录下创建一个名叫setup.sh文件, 文件内容如下:
#!/bin/sh source /opt/ros/electric/setup.bash export ROS_ROOT=/opt/ros/electric/ros export PATH=$ROS_ROOT/bin:$PATH export PYTHONPATH=$ROS_ROOT/core/roslib/ src:$PYTHONPATH export ROS_PACKAGE_PATH=~/ros_workspace :/opt/ros/electric/stacks:$ROS_PACKAGE_ PATH 最后执行: $ . setup.sh $ source ~/setup.sh
3、确定ROS路径是否设置成功,运行如下命 令: $ echo $ROS_PACKAGE_PATH
二、ROS文件系统
Packages Manifest Stacks Stack Manifest
三、ROS文件系统操作指令
rospack/rosstack A tool inspecting packages/stacks. roscd Changes directories to a package or stack. rosls Lists package or stack information. roscreate-pkg Creates a new ROS package. roscreate-stack Creates a new ROS stack. rosdep Installs ROS package system dependencies. rosmake Builds a ROS package. roswtf Displays a errors and warnings about a running ROS system or launch file. rxdeps Displays package structure and dependencies.
www.ros.org
汇报人:程 宏 2012年5月10日
ROS
ROS简介
ROS (Robot Operating System) provides libraries and tools to help software developers create robot applications. It provides hardware abstraction, device drivers, libraries, visualizers, message-passing, package management, and more. ROS is licensed under an open source, BSD license.
Run turtlesim:
$ rosrun turtlesim turtlesim node
rosnode
Displays debugging information about ROS nodes, including publications, subscriptions and connections. Test connectivity to node. List active nodes. Print information about a node. List nodes running on a Kills a running node.
# xyz - vector rotation axis, w - scalar term (cos(ang/2)) float64 x float64 y float64 z float64 w
rosrun
rosrun allows you to run an executable in an arbitrary package without having to cd (or roscd) there first.
$ rosmake roscpp_tutorials rospy_tutorials rxtools [ rosmake ] Packages requested are: ['roscpp_tutorials', 'rospy_tutorials', 'rxtools'] [ rosmake ] Logging to directory/home/chhong/.ros/rosmake/rosmake_output20120511-000416 ... [ rosmake ] Results: [ rosmake ] Built 28 packages with 0 failures. [ rosmake ] Summary output to directory [ rosmake ] /home/chhong/.ros/rosmake/rosmake_output20120511-000416
相关文档
最新文档