一.使用的运动规划库
当前我们使用的是OMPL运动规划库,他支持多种类型的机器人和规划问题,可以用于解决复杂的运动规划问题。简单说,规划出一条运动轨迹。给定一个具体的机械臂结构,给定一个目标,然后OMPL会规划一条合理的不与环境中任何障碍发生碰撞的轨迹。
二.开始控制真实世界机械臂
1.demo.launch中的参数fake_excution值设置为false
在默认生成的moveit配置文件中,参数基本上是针对虚拟机械臂而言的,因此我们可以在rviz中观察到模型的运动,但是,这种控制虚拟机械臂的方法不会将真正的控制信号发送出来,所以我们要想在真实世界中控制机械臂时得到控制moveit输出的控制信号,所需要的action是FollowJointTrajectoryAction,它是moveit中专门控制真实机械臂的。
<arg name="fake_execution" value="false"/>
将fake_execution设置为false,意思是启动真实机械臂执行
同时,注释以下代码,时期不在发布虚拟的joint_states,因为驱动真实机械臂时,我们要同步的是真实机械臂的joint_states,拿到真实机械臂的关节状态然后通过joint_states发布出来。
<!-- We do not have a real robot connected, so publish fake joint states via a joint_state_publisher
MoveIt's fake controller's joint states are considered via the 'source_list' parameter -->
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" unless="$(arg use_gui)">
<rosparam param="source_list">[move_group/fake_controller_joint_states]</rosparam>
</node>
<!-- If desired, a GUI version is available allowing to move the simulated robot around manually
This corresponds to moving around the real robot without the use of MoveIt. -->
<node name="joint_state_publisher" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" if="$(arg use_gui)">
<rosp

最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



