Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HrpsysConfig.clear not stopping the previous command while clearOfGroup does #327

Open
130s opened this issue May 15, 2017 · 0 comments
Open

Comments

@130s
Copy link
Contributor

130s commented May 15, 2017

In my understanding both HrpsysConfigurator.clear and HrpsysConfigurator.clearOfGroup cancels the commands that SequencePlayer is executing. However, I'm seeing clear does not work as expected while clearOfGroup does.

See youtube video.

In this video a following code which is a modification from hironx_ros_bridge/test/test_hironx.py is used.
As commented inline, when robot.clear() is used, both arms reach the poses passed to setJointAnglesOfGroup, which is not what I expect.

RARM_HIGHEST = [-0.6, 0, -140, 15.2, 9.4, 3.2]
robot.goInitial(tm=2, init_pose_type=0)
#clear_time = [4.5, 4.0, 3.5, 3.0, 2.5, 2.0, 1.5, 1.0]
clear_time = [2.0, 1.5, 1.0]
for i in range(len(clear_time)):
    robot.goInitial(tm=2, init_pose_type=0)
    robot.setJointAnglesOfGroup("rarm", RARM_HIGHEST, 5, wait=False);
    robot.waitInterpolationOfGroup("rarm")
    robot.clearLog()
    robot.setJointAnglesOfGroup("rarm", [-0.6, 0, -100, 15.2, 9.4, 3.2], 5, wait=False);
    robot.waitInterpolationOfGroup("rarm")
    robot.setJointAnglesOfGroup("rarm", RARM_HIGHEST, 5, wait=False);
    robot.setJointAnglesOfGroup("larm", [-0.6, 0, -100, 15.2, 9.4, 3.2], clear_time[i], wait=True);#  time.sleep(clear_time[i]);
    robot.clearOfGroup("rarm")  # Works as expected.
    #robot.clear()              # Does not work as expected; both arms reach the poses passed to `setJointAnglesOfGroup` above.
    robot.waitInterpolationOfGroup("rarm")

Is something missing / am I wrong / else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant