MoveItCommanderException: Error setting joint target. Is the target within bounds?
Hey guys,
I have a 5 DOF arm. I am controlling it with an XBOX 360 controller.
Now, the maximum limits my arm can reach is +/-3.1 radians. As soon as it reaches either of the limitations, it throws the following error:
[ERROR] [1526221188.380066]: bad callback: <function callback at 0x7f48e9de4e60>
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
cb(msg)
File "/home/kashyap/catkin_ws/src/igus_trajectory_planning/scripts/set_joy.py", line 123, in callback
group1.set_joint_value_target(group1_variable_values)
File "/home/kashyap/catkin_ws/src/moveit/moveit_commander/src/moveit_commander/move_group.py", line 227, in set_joint_value_target
raise MoveItCommanderException("Error setting joint target. Is the target within bounds?")
MoveItCommanderException: Error setting joint target. Is the target within bounds?
In my code, i am trying to print 'position not reachable' when it reaches either of the 2 extremes. Any suggestions as to how can I avoid the long error message from above in favour of 'position not reachable' ?
Do you want your code to terminate in the case of an out of bounds joint angle? Or do you want it to move to the closest in bounds angle while displaying an error message?
Maybe display an error message, but not terminate the entire program
any suggestions, @PeteBlackerThe3rd ?