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

Explicitly thank @Zi-ang-Cao in changelog. #27

Merged
merged 5 commits into from
Sep 8, 2024
Merged
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
12 changes: 4 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ All notable changes to this project will be documented in this file.
### Added

- Examples:
- Mobile Kinova loaded from a module-oriented MJCF description: [mobile_kinova.py](examples/mobile_kinova.py)
- remove the nested class naming convention in the [tidybot.xml](tidybot.xml) file, allowing for seamless swapping of end-effectors.
- Mobile Kinova with LEAP hand: [mobile_kinova_leap.py](examples/mobile_kinova_leap.py)
- The example scripts also include updated recommendations for controlling the mobile base, aiming to minimize unnecessary rotation.

### Added

- Examples:
- Mobile Kinova loaded from a module-oriented MJCF description: [mobile_kinova.py](examples/mobile_kinova.py) (thanks @Zi-ang-Cao)
- Removes the nested class naming convention in [tidybot.xml](tidybot.xml), allowing for seamless swapping of end-effectors.
- Mobile Kinova with LEAP hand: [mobile_kinova_leap.py](examples/mobile_kinova_leap.py) (thanks @Zi-ang-Cao)
- The example scripts also includes updated recommendations for controlling the mobile base, aiming to minimize unnecessary rotation.
- UFactory xArm7 with LEAP hand: [xarm_leap.py](examples/arm_hand_xarm_leap.py)

## [0.0.3] - 2024-08-10
Expand Down
18 changes: 8 additions & 10 deletions examples/mobile_kinova_leap.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@

fingers = ["tip_1", "tip_2", "tip_3", "th_tip"]

# fmt: off
HOME_QPOS = [
# Mobile Base.
0, 0, 0,
# Kinova
# Kinova.
0, 0.26179939, 3.14159265, -2.26892803, 0, 0.95993109, 1.57079633,
# Leap hand.
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
]
# fmt: on


def construct_model():
Expand Down Expand Up @@ -86,9 +88,9 @@ def __call__(self, key: int) -> None:

# When move the base, mainly focus on the motion on xy plane, minimize the rotation.
posture_cost = np.zeros((model.nv,))
posture_cost[2] = 1e-3 # Mobile Base
# posture_cost[-16:] = 5e-2 # Leap Hand
posture_cost[-16:] = 1e-3 # Leap Hand
posture_cost[2] = 1e-3 # Mobile Base.
# posture_cost[-16:] = 5e-2 # Leap Hand.
posture_cost[-16:] = 1e-3 # Leap Hand.

posture_task = mink.PostureTask(model, cost=posture_cost)

Expand All @@ -97,7 +99,6 @@ def __call__(self, key: int) -> None:
immobile_base_cost[2] = 1e-3
damping_task = mink.DampingTask(model, immobile_base_cost)


finger_tasks = []
for finger in fingers:
task = mink.RelativeFrameTask(
Expand Down Expand Up @@ -152,9 +153,7 @@ def __call__(self, key: int) -> None:
model, data, f"{finger}_target", f"leap_right/{finger}", "site"
)

T_eef_prev = configuration.get_transform_frame_to_world(
"pinch_site", "site"
)
T_eef_prev = configuration.get_transform_frame_to_world("pinch_site", "site")

rate = RateLimiter(frequency=50.0)
dt = rate.period
Expand All @@ -170,7 +169,6 @@ def __call__(self, key: int) -> None:
f"{finger}_target", "body", "leap_right/palm_lower", "body"
)
task.set_target(T_pm)


for finger in fingers:
T_eef = configuration.get_transform_frame_to_world("pinch_site", "site")
Expand Down Expand Up @@ -208,7 +206,7 @@ def __call__(self, key: int) -> None:
mujoco.mj_step(model, data)
else:
mujoco.mj_forward(model, data)

T_eef_prev = T_eef.copy()

# Visualize at fixed FPS.
Expand Down
4 changes: 3 additions & 1 deletion examples/stanford_tidybot/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Tidybot and Mobile Kinova Description (MJCF)

## Overview

This package introduces a mobile manipulator developed by the [Interactive Perception and Robot Learning Lab](https://iprl.stanford.edu). The robot features a Kinova Gen 3 arm mounted on a holonomic base, which has been used in the well-known [Tidybot](https://tidybot.cs.princeton.edu) project for room tidying tasks. To expand the robot's functionality, the default 2F85 Robotiq gripper can be replaced with more dexterous hands, such as the [Leap Hand](https://leaphand.com/). The package provides a modular MJCF description of the mobile Kinova robot, enabling seamless swapping of end-effectors. Please note the nested class naming convention in the [tidybot.xml](tidybot.xml) file. For compatibility, this convention has been removed in the [mobile_kinova.xml](mobile_kinova.xml) file.

## Exaples
## Examples

In the example script [mobile_tidybot.py](../mobile_tidybot.py), the robot equipped with the 2F85 Robotiq gripper is loaded from [tidybot.xml](tidybot.xml).
In the example scripts [mobile_kinova.py](../mobile_kinova.py) and [mobile_kinova_leap.py](../mobile_kinova_leap.py), the mobile Kinova robot is loaded from [mobile_kinova.xml](mobile_kinova.xml). Both scripts also include updated recommendations for controlling the mobile base, aiming to minimize unnecessary rotation.
Loading