ROS学习笔记

***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作为基,则会出现部件歪斜现象,切记!


controller yaml中的base_width参数是指两个差速轮中心轴之间的距离。差速轮所以这里diff_controller设置了自后urdf里面只能控制两个轮子。。多余的轮子设成fixed,否则会报错。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值