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
fixed getfeedback to work only for arm DOFs
  • Loading branch information
LeaStef committed Aug 21, 2025
commit 8149846a70ab7f9a65c843044d12b5f22b28d857
85 changes: 42 additions & 43 deletions abr_control/interfaces/nv_isaacsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,40 +124,38 @@ def send_target_angles(self, q):
"""Moves the arm to the specified joint angles

q : numpy.array
the target joint angles [radians]
the target joint angles [radians]
"""
# print("robot joint pos: ", self.robot.get_joint_positions())
#print("q: ", q)
#TODO make more general, with flag
#TODO use same flag for jaco2 and H1


# works well
self.articulation.set_joint_positions(q)
'''
tar = np.zeros(17)
self.articulation.set_joint_positions(tar)

self.articulation.set_joint_positions([0., 0., 0., 0.,
0., 0., 0., 0.,
0., 0., 0., 0.,
0., 0., 0., 0.,
0., 0., 0., 0.])
'''

# works but just sets robot abruptly to the target angles
#self.robot.set_joint_positions(q)


# WORKS AND MOVES ROBOT SLOWLY, issues with time import
from omni.isaac.core.utils.types import ArticulationAction # type: ignore
#self.articulation.apply_action(ArticulationAction(q))
#self.articulation.apply_action(ArticulationAction(np.array([1.0, 0.0,2.0,3.0,0.0,0.0])))




#dof_ptr = self.dci.find_articulation_dof(art, "panda_joint2")
print("LENGTH q:", len(q))
# full jaco2 arm with hand DOF
if np.size(q) == 12:
self.articulation.set_joint_positions(q)
# full H1 body with all DOF
if np.size(q) == 19:
self.articulation.set_joint_positions(q)
# only jaco2 arm
if np.size(q) == 6:
fb = self.get_feedback(with_hand=True)
fb_q = fb["q"]
fb_q[:6] = q
self.articulation.set_joint_positions(fb_q)
# only H1 right arm
if np.size(q) == 4:
fb = self.get_feedback(arm_only=False)
fb_q = fb["q"]
fb_q [6] = q[0] # right_shoulder_pitch_joint
fb_q [10] = q[1] # right_shoulder_roll_joint
fb_q [14] = q[2] # right_shoulder_yaw_joint
fb_q [18] = q[3] # right_elbow_joint
self.articulation.set_joint_positions(fb_q)
else:
print("The method send_target_angles of the isaacsim interface does not support the number of joint angles that are attempted to be set.")
# move simulation ahead one time step
self.world.step(render=True) # execute one physics step and one rendering step




Expand All @@ -171,27 +169,28 @@ def get_feedback(self, arm_only=True):
q = self.articulation.get_joint_positions()
dq = self.articulation.get_joint_velocities()

# get all 12 DOF of the robot
# get all DOF of the robot
if arm_only == False:
self.q = q
self.dq = dq
# get only DOF of the arm
else:
# only get the DOF of the (right) arm
self.q[0] = q[6] # right_shoulder_pitch_joint
self.q[1] = q[10] # right_shoulder_roll_joint
self.q[2] = q[14] # right_shoulder_yaw_joint
self.q[3] = q[18] # right_elbow_joint

self.dq[0] = dq[6] # right_shoulder_pitch_joint
self.dq[1] = dq[10] # right_shoulder_roll_joint
self.dq[2] = dq[14] # right_shoulder_yaw_joint
self.dq[3] = dq[18] # right_elbow_joint

tmp = np.zeros(4)
tmp[0] = q[6] # right_shoulder_pitch_joint
tmp[1] = q[10] # right_shoulder_roll_joint
tmp[2] = q[14] # right_shoulder_yaw_joint
tmp[3] = q[18] # right_elbow_joint
self.q = tmp

tmp[0] = dq[6] # right_shoulder_pitch_joint
tmp[1] = dq[10] # right_shoulder_roll_joint
tmp[2] = dq[14] # right_shoulder_yaw_joint
tmp[3] = dq[18] # right_elbow_joint
self.dq = tmp
return {"q": self.q, "dq": self.dq}




def get_xyz(self, name):
"""Returns the xyz position of the specified object

Expand Down
8 changes: 7 additions & 1 deletion examples/isaacsim/h1_lock_orientation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,23 @@
interface = IsaacSim(robot_config, dt=dt)
interface.connect()

feedback = interface.get_feedback()
q=feedback["q"]

interface.send_target_angles(q)

try:
print("\nSimulation starting...")
count = 0
while 1:

feedback = interface.get_feedback(arm_only=False)
feedback = interface.get_feedback()
q=feedback["q"]
#print("Q: ", q)

interface.send_target_angles(q)
#interface.world.step(render=True) # execute one physics step and one rendering step

count += 1


Expand Down