int8, int16, int32, int64 (plus uint*)
float32, float64
string
time, duration
other msg files
variable-length array[] and fixed-length array[]
roslog
catkin_make –source myworkspace 指定make的目录
roscore
rosnode list
rosnode ping rosout
rosrun turtlesim turtlesim_node (可选 __name:=my_turtle)
rostopic list -v 列出所有主题的发布和接收
rostopic echo可以显示在某个话题上发布的数据胡
rosrun rqt_graph rqt_graph 绘制各个node发布和接收的topic
rosparam list
$ mkdir -p ~/catkin_ws/src
$ cd ~/c$ cd ~/catkin_ws/
$ catkin_make_init_workspace
$ cd ~/catkin_ws/
$ catkin_make
$ source devel/setup.bash
cd ~/catkin_ws/src
catkin_create_pkg common std_msgs rospy roscpp
cd ~/catkin_ws/ && catkin_make
cd ~/catkin_ws/ && catkin_make --pkg xxx
rostopic type /turtle1/cmd_vel | rosmsg show
发布、等待和接收
# Publisher of type nav_msgs/Odometry
self.ekf_pub = rospy.Publisher('output', Odometry, queue_size=5)
# Wait for the /odom_combined topic to become available
rospy.wait_for_message('input', PoseWithCovarianceStamped)
# Subscribe to the /odom_combined topic
rospy.Subscriber('input', PoseWithCovarianceStamped, self.pub_ekf_odom)
rostopic pub -1 /turtle1/cmd_vel geometry_msgs/Twist -- '[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]'
rostopic pub /turtle1/cmd_vel geometry_msgs/Twist -r 1 -- '[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]'
字符串消息类型: std_msgs/String
自定义消息类型: http://wiki.ros.org/cn/ROS/Tutorials/CreatingMsgAndSrv
方法一:
rosrun topic_tools mux /camera/image_raw /camera/rgb/image_raw
< node pkg="topic_tools" type="mux" name="mux_cmdvel" args="/camera/image_raw /camera/rgb/image_raw" / >
方法二:
< node pkg="cmvision" type="cmvision" name="color" >
< remap from="image" to="camera/rgb/image_raw"/ >
< /node >
rosservice type spawn| rossrv show
rosservice call spawn 2 2 0.2 ""
<launch>
<machine name="localhost" address="localhost" ros-root="$(env ROS_ROOT)" ros-package-path="$(env ROS_PACKAGE_PATH)" default="true" />
<node machine="localhost" name="hokuyo_node" pkg="hokuyo_node" type="hokuyo_node" />
launch>
http://learn.turtlebot.com/
https://support.clearpathrobotics.com/hc/en-us/categories/200165795-TurtleBot
https://groups.google.com/forum/#!forum/ros-sig-turtlebot
A Gentle Introduction to ROS
https://cse.sc.edu//~jokane/agitr/
launch教程
http://wenku.baidu.com/link?url=J6CRpIO364J3eV2lbR1-Q6cV9Qp8loM519KiYCXT_hi-ZM-GHcjjeMxPyg0kK46GsPZOVAL1zYMPbV7OxvicVLjmTID4_DuHKLDgwPkjIFC
arduino
turtleBot Simulation 模拟环境的搭建
http://learn.turtlebot.com/2015/02/01/28/
遇到的问题见 “常见问题1”
Getting Started with a Real TurtleBot
http://cn.mathworks.com/help/robotics/examples/getting-started-with-a-real-turtlebot.html
http://cn.mathworks.com/help/robotics/robot-operating-system-ros.html
拿ROS navigation 玩自主导航攻略
http://blog.exbot.net/archives/1129
运行 roslaunch turtlebot_gazebo gmapping_demo.launch 报如下错
[ERROR] [1433813576.466253926, 24.270000000]: Scan message must contain angles from -x to x, i.e. angle_min = -angle_max
http://answers.ros.org/question/210849/scan-message-must-contain-angles-from-x-to-x/
$ wget http://packages.ros.org/ros/ubuntu/pool/main/r/ros-indigo-gmapping/ros-indigo-gmapping_1.3.7.orig.tar.gz
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace
$ tar xvf ../../ros-indigo-gmapping_1.3.7.orig.tar.gz
$ mv ros-indigo-gmapping-1.3.7/ gmapping
$ gedit gmapping/src/slam_gmapping.cpp
Change line 409 from:
if (fabs(fabs(scan.angle_min) - fabs(scan.angle_max)) > FLT_EPSILON)
to:
if (fabs(fabs(scan.angle_min) - fabs(scan.angle_max)) > 0.003) // this is the value for Kinect
$ cd ..
$ catkin_make
$ sudo cp devel/lib/gmapping/slam_gmapping* /opt/ros/indigo/lib/gmapping/
rosrun beginner_tutorials listener.py
rostopic pub -r 100 /chatter beginner_tutorials/Mcmd – {“f”,100,0.5}