-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0873a4a
commit eb1d4c2
Showing
4 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import rbpodo as rb | ||
import numpy as np | ||
|
||
ROBOT_IP = "10.0.2.7" | ||
|
||
|
||
def _main(): | ||
try: | ||
robot = rb.Cobot(ROBOT_IP) | ||
rc = rb.ResponseCollector() | ||
|
||
res = robot.set_tcp_info(rc, np.array([0, 0, 0, 0, 0, 0])) | ||
if not res.is_success(): | ||
print("failed to set tcp") | ||
exit(-1) | ||
rc = rc.error().throw_if_not_empty() | ||
|
||
res = robot.set_user_coordinate(rc, 0, np.array([0, 0, 0, 0, 90, 0])) | ||
if not res.is_success(): | ||
print("failed to set user coordinate") | ||
exit(-1) | ||
rc = rc.error().throw_if_not_empty() | ||
|
||
robot.move_l_rel(rc, np.array([100, 0, 0, 0, 0, 0]), 100, 200, rb.ReferenceFrame.User0) | ||
if robot.wait_for_move_started(rc, 0.5).type() == rb.ReturnType.Success: | ||
robot.wait_for_move_finished(rc) | ||
rc = rc.error().throw_if_not_empty() | ||
except Exception as e: | ||
print(e) | ||
|
||
|
||
if __name__ == "__main__": | ||
_main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters