Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3672d6e
added basic interface for isaacsim
LeaStef Apr 22, 2025
0a7b3d6
create world with dt
LeaStef Apr 24, 2025
73d07bb
implemented method connect in interface for isaacsim
LeaStef Apr 25, 2025
f34bf78
implemented method get_feedback to provide joint angles and joint ang…
LeaStef Apr 25, 2025
e2fe8ac
implemented sned_target_angles
LeaStef Apr 28, 2025
6578760
add method to provide pose
LeaStef May 1, 2025
b953b7f
example script to make arm follow cube
LeaStef May 1, 2025
a2ca838
added methods getOreintation() and set_xyz to isaac interface
LeaStef May 6, 2025
0362a48
switched urdf import to xml import
LeaStef May 13, 2025
6e1e766
interface adapted to h1, locked robote pelvis orientation so it does …
LeaStef May 16, 2025
8149846
fixed getfeedback to work only for arm DOFs
LeaStef May 20, 2025
4e70b1a
added config file for H1
LeaStef May 21, 2025
25ab5ca
added matrix for segment lengths of arm
LeaStef May 23, 2025
59d3925
added articulation view
LeaStef May 23, 2025
fb9445b
working example with floating robot
LeaStef Jun 17, 2025
0d70a58
implementation method quaternion, Tx, R
LeaStef Jun 20, 2025
adfa03d
floating control now works for ur5 and jaco2
LeaStef Jun 24, 2025
9e412b8
adapted tu num of controlled DOF
LeaStef Jun 24, 2025
bc7a01e
generalized send u
LeaStef Jun 24, 2025
361b35c
new implementation of the method connect, following the structure of …
LeaStef Jun 25, 2025
00471ef
Create a visual-only cube (no collision)
LeaStef Jun 27, 2025
96b2151
fixed gains of arm joints, which were to stiff for force control
LeaStef Jul 7, 2025
04d54a8
fixed def M
LeaStef Jul 7, 2025
823aa6f
Example with force_osc working
LeaStef Jul 8, 2025
c2593a2
added example linear path gaussian velocity
LeaStef Jul 8, 2025
1da42b9
adaptations for no EE
LeaStef Jul 10, 2025
fc6bd28
force control working for UR5 and jaco2
LeaStef Jul 10, 2025
f7bbb1e
adapted mass matrix to extract the correct, controlled joints
LeaStef Jul 14, 2025
4ec172c
added torso joint and used standing method in setup for h1
LeaStef Jul 15, 2025
53067fb
integrated robot H1 with hands
LeaStef Jul 16, 2025
62cdbec
fixed method set_gains_force_control so it adresses the right joints
LeaStef Jul 16, 2025
ff9299a
adapted method send_forces to work with abritary list of joint indices
LeaStef Jul 16, 2025
b1cb9ea
fixed helper methods for arbitrary indices
LeaStef Jul 17, 2025
15dca0a
removed coriolis forces from function for gravity compensation
LeaStef Jul 30, 2025
4d51236
fixed indexing of jacobian due to non-fixed base
LeaStef Aug 6, 2025
0e1a270
fixed method M
LeaStef Aug 7, 2025
24db8ef
force control OSC working for H1 without gravity
LeaStef Aug 11, 2025
090944b
fixed offset for virtual EE
LeaStef Aug 14, 2025
e6df5fe
fixed calc of body_link in J() and removed obsolete h1 setup
LeaStef Aug 15, 2025
429213d
works with gravity now on all 4 robots (weird fix for h1)
LeaStef Aug 19, 2025
be900e3
example force_osc_xyz_linear_path_gaussian_velocity works with ur5 an…
LeaStef Aug 20, 2025
c503fbe
added documentation
LeaStef Aug 21, 2025
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
Prev Previous commit
Next Next commit
force control working for UR5 and jaco2
  • Loading branch information
LeaStef committed Aug 21, 2025
commit fc6bd286edeca02f2de990e90c01f76c63d7f7ec
92 changes: 14 additions & 78 deletions abr_control/arms/isaacsim_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,37 +163,24 @@ def _connect(self, world, stage, articulation, articulation_view, joint_pos_addr




def g(self, q=None):
"""
Returns the joint-space forces due to gravity, Coriolis, and centrifugal effects
in Isaac Sim (equivalent to MuJoCo's qfrc_bias).

Parameters
----------
q: np.ndarray, optional (Default: None)
Joint positions to compute the bias forces at. If None, uses current sim state.
Returns the gravity and Coriolis/centrifugal forces for the controlled arm_joints.
Args:
q (np.ndarray, optional): Joint positions
Returns:
np.ndarray: Generalized bias forces for controlled DOF
"""
# Compute gravity and Coriolis/centrifugal separately
gravity = self.articulation_view.get_generalized_gravity_forces()
coriolis = self.articulation_view.get_coriolis_and_centrifugal_forces()
gravity = self.articulation_view.get_generalized_gravity_forces(joint_indices=self.joint_pos_addrs)[0]
coriolis = self.articulation_view.get_coriolis_and_centrifugal_forces(joint_indices=self.joint_pos_addrs)[0]

# Total generalized bias forces
g_full = gravity + coriolis

# Handle batch dimension if present
if g_full.ndim == 2:
if g_full.shape[0] == 1:
g_full = g_full[0] # Remove batch dimension

if q is not None:
# If q is provided, ensure g matches the size of q
if len(g_full) != len(q):
g_full = g_full[:len(q)]
g = gravity + coriolis

return -g_full

return -g



def dJ(self, name, q=None, dq=None, x=None):
"""Returns the derivative of the Jacobian wrt to time
Expand Down Expand Up @@ -242,12 +229,8 @@ def J(self, name, q=None, x=None, object_type="body"):
raise RuntimeError("ArticulationView contains no environments. Make sure it's properly initialized and contains articulations.")

# jaco2 version
link_index = self.articulation_view.get_link_index(name)

# parent version for ur5 and h1
#link_index = self.articulation_view.get_link_index(self.EE_parent_link)

#link_index = self.safe_get_link(name, default=6)
#link_index = self.articulation_view.get_link_index(name)
link_index = self.N_JOINTS -1

# Extract Jacobian for specific link
env_idx = 0 # Assuming single environment
Expand Down Expand Up @@ -490,51 +473,4 @@ def set_joint_velocities(self, dq):
full_velocities[idx] = dq[i]
self.articulation.set_joint_velocities(full_velocities)

#TODO remove of fix method used for UR5
def _get_link_index(self, name):
"""Get the index of a link by its name"""

import omni.isaac.core.utils.prims as prims_utils

prim_path = self._get_prim_path(name)
prim = prims_utils.get_prim_at_path(prim_path)
parent_prim = prims_utils.get_prim_parent(prim)
parent_name = parent_prim.GetName()
link_index = self.articulation_view.get_link_index(parent_name)
print(f"Link name: {name}, Prim path: {prim_path}, Parent name: {parent_name}, Link index: {link_index}")

return link_index + 1

# remove

def safe_get_link(self, name, default=None):
if self.has_EE is True:
return self.articulation_view.get_link_index(name)
else:
from pxr import UsdGeom

# Get the parent prim
parent_prim = self.stage.GetPrimAtPath(self.prim_path)


for child in parent_prim.GetChildren():
if child.GetName() == name:
print("Found EE prim:", child.GetPath())
ee_xform = UsdGeom.Xformable(self.stage.GetPrimAtPath(child.GetPath()))
return ee_xform

return default


def adjoint_transform(offset=[0, 0, 0.05]):
r = np.asarray(offset)
S = np.array([
[0, -r[2], r[1]],
[r[2], 0, -r[0]],
[-r[1], r[0], 0]
])
upper = np.hstack([np.eye(3), np.zeros((3,3))])
lower = np.hstack([-S, np.eye(3)])
adj = np.vstack([upper, lower])
return adj


1 change: 0 additions & 1 deletion abr_control/arms/unitree_H1/__init__.py

This file was deleted.

Loading