我有一个interbotix rx150,并且正在使用python接口进行测试(使用伪造的机器人进行启动)
roslaunch interbotix_moveit_interface moveit_interface.launch robot_name:=rx150 use_fake:=true use_python_interface:=true dof:=6
默认自由度值为5,并使用它,程序可以正常运行
# ok - runs without a problem
roslaunch interbotix_moveit_interface moveit_interface.launch robot_name:=rx150 use_fake:=true use_python_interface:=true
rx150具有6自由度,因此我按以下方式运行它:
# NOT ok
roslaunch interbotix_moveit_interface moveit_interface.launch robot_name:=rx150 use_fake:=true use_python_interface:=true dof:=6
我收到“列表分配索引超出范围”的错误 对于joint_goal,因为moveit组(通过get_current_joint_values())返回5个状态的列表
如何将moveit组中的自由度设置为6?
# The error
('joint_goal', [0.0, 0.0, 0.0, 0.0, 0.0])
Traceback (most recent call last):
File "/home/avnerm/interbotix_ws/src/interbotix_ros_arms/interbotix_examples/interbotix_moveit_interface/scripts/moveit_python_interface", line 642, in <module>
main()
File "/home/avnerm/interbotix_ws/src/interbotix_ros_arms/interbotix_examples/interbotix_moveit_interface/scripts/moveit_python_interface", line 598, in main
step1(tutorial)
File "/home/avnerm/interbotix_ws/src/interbotix_ros_arms/interbotix_examples/interbotix_moveit_interface/scripts/moveit_python_interface", line 430, in step1
joint_goal[5] = pi/3
IndexError: list assignment index out of range