set params
This commit is contained in:
parent
68a6c712f9
commit
5eaf077fb7
2 changed files with 19 additions and 4 deletions
10
main.py
10
main.py
|
@ -33,10 +33,12 @@ config = {
|
|||
|
||||
def main():
|
||||
robot = RobotClient(HOST, PORT)
|
||||
robot.set_joint_maxacc(2)
|
||||
robot.set_joint_maxvelc(2)
|
||||
# robot.move_linear_cartesian(config["pre_grasp_position"])
|
||||
robot.move_to_pose(config["pre_grasp_position"])
|
||||
#robot.set_joint_maxacc(3)
|
||||
#robot.set_joint_maxvelc(3)
|
||||
#robot.set_end_max_line_velc(0.6)
|
||||
robot.set_end_max_line_acc(0.8)
|
||||
robot.move_linear_cartesian(config["pre_grasp_position"])
|
||||
# robot.move_to_pose(config["pre_grasp_position"])
|
||||
# robot.move_to_pose(config["grasp_position"])
|
||||
# robot.move_to_pose(config["post_grasp_position"])
|
||||
robot.close()
|
||||
|
|
13
utils.py
13
utils.py
|
@ -258,6 +258,19 @@ class RobotClient:
|
|||
ret = self._send_single_json(cmd)
|
||||
if ret.get("msg") != "succ":
|
||||
raise RuntimeError(f"set_joint_maxvelc failed: {ret}")
|
||||
|
||||
def set_end_max_line_velc(self, vel: float):
|
||||
cmd = {"command": "set_end_max_line_velc", "end_maxvelc": vel}
|
||||
ret = self._send_single_json(cmd)
|
||||
if ret.get("msg") != "succ":
|
||||
raise RuntimeError(f"set_end_max_line_velc failed: {ret}")
|
||||
|
||||
def set_end_max_line_acc(self, vel: float):
|
||||
cmd = {"command": "set_end_max_line_acc", "end_maxacc": vel}
|
||||
ret = self._send_single_json(cmd)
|
||||
if ret.get("msg") != "succ":
|
||||
raise RuntimeError(f"set_end_max_line_acc failed: {ret}")
|
||||
|
||||
|
||||
def close(self):
|
||||
self.sock.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue