描述
ROS系统下,想要查看Rviz中机械臂的末端位姿
命令
-
在已经
roslaunch
某个文件,打开了gazebo和rviz后
另起终端执行命令rosrun moveit_commander moveit_commander_cmdline.py
-
执行命令
use <group name>
为自己程序中设置的,我执行的是默认的manipulator
use manipulator
-
执行命令
current
current命令将会返回运动组的当前状态,包括关节的状态(关节1, 2, 3, ……)和末端的状态(px, py, pz, ox, oy, oz, ow)
-
得到结果
结果示例current joints = [0.024362181615 -0.766599546606 0.984416318932 -0.218138826773 0.0244373199934 0.000484864547573] ee_link pose = [ header: seq: 0 stamp: secs: 65 nsecs: 834000000 frame_id: "/world" pose: position: x: 0.686271368666 y: 0.20820462441 z: 0.20456326523 orientation: x: -0.707133343088 y: -0.707080213584 z: 5.48115477562e-05 w: 6.03803562514e-05 ] ee_link RPY = [-3.141429747340933, -7.869364379764052e-06, 1.5707211896882936] manipulator>