Skip to content

Commit

Permalink
updating package.yaml dependencies, minor tip_link bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
eaa3 committed Apr 24, 2024
1 parent a2dc208 commit 264f0ee
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 12 deletions.
6 changes: 3 additions & 3 deletions grip/robot/bullet_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,13 +1151,13 @@ def random_texture(self) -> None:
if self.texture_randomiser is not None:
self.texture_randomiser.randomise(self)

def enable_torque_sensor(self, enable: bool) -> None:
def enable_torque_sensor(self, enable: bool, joint_id: int = None) -> None:
"""
Enable or disable torque_sensor.
"""

joint = self.actuated_joint_ids[-1] if joint_id is None else joint_id
p.enableJointForceTorqueSensor(
self.id, self.ee_index, enable, physicsClientId=self.phys_id
self.id, joint, enable, physicsClientId=self.phys_id
)

def get_contact_force(
Expand Down
10 changes: 6 additions & 4 deletions grip/robot/bullet_robotiq_2f_gripper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class BulletRobotiq2FGripper(BulletRobot, EndEffectorType):
def __init__(self, **kwargs):
kwargs["urdf_file"] = kwargs.get("urdf_file", None)
kwargs["ee_index"] = kwargs.get("ee_index", -1)
kwargs["tip_link"] = kwargs.get("tip_link", "robotiq_arg2f_base_link")
kwargs["tip_link"] = kwargs.get("tip_link", "tool0")

print("Tip link: ", kwargs["tip_link"])

kwargs["joint_names"] = kwargs.get(
"joint_names",
Expand Down Expand Up @@ -65,9 +67,9 @@ def true_ee_pose(self):
lft_pos, _ = self.get_link_pose(self.link_dict["left_inner_finger_tip"])
rft_pos, _ = self.get_link_pose(self.link_dict["right_inner_finger_tip"])
ee_payload_pos = (lft_pos + rft_pos) / 2
_, ee_payload_quat = self.get_link_pose(
self.link_dict["robotiq_arg2f_base_link"]
)

self.get_link_id()
_, ee_payload_quat = self.get_link_pose(self.tip_link)
return ee_payload_pos, ee_payload_quat

@property
Expand Down
2 changes: 1 addition & 1 deletion grip/robot/robot_arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(
self.gripper_type,
parent=self,
max_force=gripper_max_force,
ee_index=self.ee_index,
tip_link=self.tip_link,
urdf_file=None,
sliders=self._sliders,
)
Expand Down
4 changes: 3 additions & 1 deletion grip/ros/ros_robot_arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ def __init__(

else:
self.joint_state_sub = JointStateSub(
self.node, joint_update_callback=self.set_angles
self.node,
topic_name=self.state_topic,
joint_update_callback=self.set_angles,
)
self.trajectory_client = TrajectoryActionClient(self.node)

Expand Down
7 changes: 7 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
<exec_depend>ros2_controllers</exec_depend>
<exec_depend>gripper_controllers</exec_depend>
<exec_depend>moveit_ros_perception</exec_depend>
<exec_depend>python3-pybullet-pip</exec_depend>
<exec_depend>python3-open3d-pip</exec_depend>
<exec_depend>python-transforms3d-pip</exec_depend>
<exec_depend>python3-scipy</exec_depend>
<exec_depend>python3-matplotlib</exec_depend>
<exec_depend>python3-trimesh-pip</exec_depend>
<exec_depend>python3-numpy</exec_depend>

<test_depend>python3-pytest</test_depend>
<export>
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ matplotlib>=3.3.4 # plotting tools
pybullet-planning-eaa # pure python motion planning
trimesh==3.9.20 # mesh processing tools
xatlas==0.0.7 # mesh parametrisation
transforms3d==0.4.1
strenum
transforms3d==0.4.1
1 change: 0 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pybullet-planning-eaa # pure python motion planning
trimesh==3.9.20 # mesh processing tools
xatlas==0.0.7 # mesh parametrisation
transforms3d==0.4.1
strenum
wheel
pytest
ipdb
Expand Down

0 comments on commit 264f0ee

Please sign in to comment.