自主导航与远程控制中的速度优化velocity_smoother与多路输入切换cmd_vel_mux的层次关系(ros/ cmd_vel)


         利用机器人操作系统ros对机器人进行控制,自主导航navigation输出的速度由于加速度大,会造成小车震动,需要进行速度平滑。

而实际运行时,还可以用用手柄,键盘,安卓app等对机器人进行操作,同一时刻控制小车运动,小车发生混乱,各种控制方式需要切换,因此需要用到cmd_vel_mux对多路速度进行切换,划分优先级。


键盘控制/节点node(话题topic:    keyop(key_cmd_vel)

手柄控制/节点node(话题topic: joyop(joy_cmd_vel)

自主导航/节点node(话题topic:     navigation(cmd_vel)

速度平滑/节点node(话题topic: velocity_smoother(cmd_vel_smooth)

       http://wiki.ros.org/yocs_velocity_smoother?distro=indigo

控制方式切换/节点node(话题topic:cmd_vel_mux(cmd_vel_mux)

     http://wiki.ros.org/yocs_cmd_vel_mux?distro=indigo

基座 :mobile_base



一直很疑惑到底如何切换,然后看到资料Kobuki'sControlSystemhttp://wiki.ros.org/kobuki/Tutorials/Kobuki%27s%20Control%20System)。 其中这样一段话:

kobuki_node:(AKA mobile base) is actually a nodelet, which wraps the C++ driverfor communicating with Kobuki

  • cmd_vel_mux:is a velocity command multiplexer (or in otherwords a switch). Itmanages multiple incoming velocity commands according to theconfigured priority.

  • Kobuki controller: is a nodelet-based controller type - usedfor various applications; one example is thekobuki_safety_controller,which watches the bumper, cliff and wheel drop sensors and actsaccordingly. Use this to implement your own reactive controller (seethe next tutorial)


Furthermore, thereis an implementation of a velocity smoother:yocs_velocity_smoother.This tool is optional, but highly recommended to use. In case a nodepublishing velocity commands can't ensure their smoothness, put thissmoother in between thatnode and the cmd_vel_mux.

一直纠结于这句话,其中thatnode被我误解,我把cmd_vel_mux放在了keyop(key_cmd_vel)joyop(joy_cmd_vel)navigation(cmd_vel)下面,velocity_smoother(cmd_vel_smooth)前面,怎么样都觉得不对劲,就修改了velocity_smoother的节点源码,利用cmd_vel_mux输出的active来判别是导航还是远程控制,回看了下资料,才发现我把顺序搞反了。




                                        

\


欢迎大家批评,指正,交流!

联系方式:

emai:  tongzhuodenilove@163.com




评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值