***ROS uses meters for distance and radians for angular measurements.
rostopic pub -r 10 /cmd_vel gemotry_msgs/Twist ''
# -r 10 → rate:10Hz
rostopic pub -1 /turtle1/cmd_vel geometry_msgs/Twist -- '[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]'
#this option (double-dash) tells the option parser that none of the following arguments is an option. This is required in cases where your arguments have a leading dash -, like negative numbers.
#This option (dash-one) causes rostopic to only publish one message then exit.
rosmsg show geometry_msgs/Twist
Twist message on command line:
'{linear: {x: 0.1, y: 0, z: 0}, angular: {x: 0, y: 0, z: 0}}'
数值为线速度与角速度。
rospy.get_param()函数
# get a global parameter
rospy.get_param('/global_param_name')
# get a parameter from our parent namespace
rospy.get_param('param_name')
# get a parameter from our private namespace
rospy.get_param('~private_param_name')
#specify a default value if the parameter doesn't exist
rospy.get_param('foo', 'default_value')
#set a parameter by calling rospy.set_param(param_name, param_value)
rospy.set_param('some_numbers', [1., 2., 3., 4.])
rospy.set_param('truth', True)
rospy.set_param('~private_bar', 1+2)
#If you don't know whether or not a parameter exists, you can call rospy.has_param(param_name)
if rospy.has_param('to_delete'):
rospy.delete_param('to_delete')
move_base package: Path Planning and Obstacle Avoidance
MoveBaseGoal() 指定目标
ArbotiX simulator: sensors ……
gmapping package: Map building 可以先控制机器人在环境中移动,会根据传感器获取的数据自动生成地图
AMCL(Adaptive Monte Carlo Localization, 自适应蒙特卡洛定位): localize the robot within an existing map using the current scan data coming from the robot's laser or depth camera
SLAM(simultaneous localization and mapping, 及时定位与地图构建): using gmapping and amcl package
安装PocketSphinx时报错解决方案:
安装gconf
sudo ape-get install gstreamer0.10-gconf
ROS by Example (indigo) 人脸识别
webcamera 驱动运行: 书中命令 (如下)出错
roslaunch rbx1_vision uvc_cam.launch device:=/dev/video0
出错原因:rbx1_vision 包中已经没有了 uvc_cam.launch,估计是沿用了上个版本的。作者在第10.3.2 中提到:
In previous revisions of this book, we used the excellent uvc_cam driver by Eric Perko. Although uvc_cam still builds and runs under ROS indigo, Eric is no longer maintaining the package. So for this revision, we will switch to the Bosch usb_cam driver which appears to work well with a number of different internal and external web cameras.
解决办法:用 usb_cam 取代 uvc_cam
sw_urdf_exporter
导入子模块后切记创建一个虚拟的link,若以自己sw创建的base_link作为基,则会出现部件歪斜现象,切记!