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

[WIP] Enable hrpsys collision detection. #238

Open
wants to merge 1 commit into
base: indigo-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def getRTCList(self):
['sh', "StateHolder"],
['fk', "ForwardKinematics"],
['el', "SoftErrorLimiter"],
# ['co', "CollisionDetector"],
['co', "CollisionDetector"],
# ['sc', "ServoController"],
['log', "DataLogger"]
]
Expand Down
14 changes: 14 additions & 0 deletions nextage_ros_bridge/test/test_nxopen.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@ def test_set_targetpose_relative_dz(self):
self._robot.goInitial(_GOINITIAL_TIME_MIDSPEED)
assert(self._set_relative(dz=0.0001))

def test_hrpsys_collisiondetection(self):
'''
Passing the pose that left arm collides into the right arm, so
this test succeeds when the command fails (, which is hopefully due
to CollisionDetector of hrpsys.
Image: https://drive.google.com/file/d/0Bw_hbVS3wTLyc1FHclFxbkcydTA/view?usp=sharing
'''
_dx_collision = -0.1
_dy_collision = -0.4
self._robot.goInitial(_GOINITIAL_TIME_MIDSPEED)
result = self._robot.setTargetPoseRelative(
_ARMGROUP_TESTED, _LINK_TESTED, _dx_collision, _dy_collision, tm=3.0)
self.assertFalse(result)

if __name__ == '__main__':
import rostest
rostest.rosrun(_PKG, 'test_nxopen', TestNextageopen)