running plan_single() with franka arm at positions other than origin fails #571
Unanswered
Abhijit16
asked this question in
Software Q&A
Replies: 1 comment
-
The scene looks like this: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use MotionGen.plan_single() in cuRobo's motion planning using Franka panda robot arm. It works fine when arm is kept at origin(0,0,0); however am running into error(MotionGenStatus.IK_Fail), when I shift the position of the arm at an offset from the world origin. I use som of Pose's inbuilt functions to compute the target cube's(a green cube named 'goalCube') new Pose with respect to the base of the arm, whose code is as follows:
`
"""
robot_base_pose_world: the robot's new base pose in the world frame.
target_pose_world: end-effector pose in the real world.
"""
def convert_target_pose_wrt_robot_base(robot_base_pose_world:Pose, target_pose_world:Pose):
# Calculate the inverse(pose) of the robot's base frame.
robot_base_inv:Pose = robot_base_pose_world.inverse()
`
This function takes in the original target pose(goal_pose) & return a new pose (goal_pose1). Now, when i supply this goal_pose1 to plan_single(), it results in IK_Fail error. During debugging, I observed that the Z position of goal_pose1 goes negative(from 0.2298 to -0.1443). I tried changing this value to several other values & finally saw that setting this to a small negative value (say,-0.01) makes plan_single() work, & the arm goes near the target cube successfully. The below code contains all these:
compute() is the main function, world_cfg() generates the world-config to be supplied to MotionGen().
`
this function returns the world-config dictionary.
def world_cfg():
stage = omni.usd.get_context().get_stage() # get the current USD stage.
usd_helper = UsdHelper() # Create an instance of UsdHelper.
def compute(db: og.Database):
#db.outputs.trajectory = []
# (1) generate WorldConfig from current stage.
world_config = world_cfg()
`
The new position of the target cube with respect to the base of the arm is correct, I verified it by creating a sample parent prim at base of the arm, & creating another child prim & setting it's value to the goal_pose1 (x,y,z) values, & it correctly superimposed on the target cube.
I am not sure why this happens, is there something else that needs to be done in the convert_target_pose_wrt_robot_base() function, or elsewhere ?
Kindly do help me.
My cuda version is 12.1.
cuRobo installation mode: isaacsim
python(using in conda env) version: 3.10.16
GPU: 4080 super
OS: Windows(venv is anaconda)
Isaacsim version: 4.5.0
Log:
2025-09-29 06:38:33 [Info] [omni.kit.app._impl] [py stdout]: Abhijit:goal_pose: Pose(position=tensor([[0.1728, 0.3770, 0.2298]], device='cuda:0'), quaternion=tensor([[1., 0., 0., 0.]], device='cuda:0'), rotation=None, batch=1, n_goalset=1, name='ee_link', normalize_rotation=True)
2025-09-29 06:38:33 [Info] [omni.kit.app._impl] [py stdout]: Abhijit:goal_pose1: Pose(position=tensor([[ 0.1728, 0.7144, -0.1443]], device='cuda:0'), quaternion=tensor([[1., 0., 0., 0.]], device='cuda:0'), rotation=None, batch=1, n_goalset=1, name='ee_link', normalize_rotation=True)
2025-09-29 06:38:33 [Info] [curobo] Planning for Single Goal: 1
2025-09-29 06:38:33 [Info] [curobo] Updating state_seq buffer reference (created new tensor)
2025-09-29 06:38:33 [Info] [curobo] MG Iter: 0
2025-09-29 06:38:33 [Info] [curobo] Updating safety params
2025-09-29 06:38:33 [Info] [curobo] Updating optimizer params
2025-09-29 06:38:33 [Info] [omni.kit.app._impl] [py stdout]: Abhijit: number of obstacles: 2
2025-09-29 06:38:33 [Info] [omni.kit.app._impl] [py stdout]: Abhijit result success: False
2025-09-29 06:38:33 [Info] [omni.kit.app._impl] [py stdout]: Abhijit: Status: MotionGenStatus.IK_FAIL
2025-09-29 06:38:33 [Info] [omni.kit.app._impl] [py stdout]: Abhijit result failure details: MotionGenResult(success=tensor([False], device='cuda:0'), valid_query=True, optimized_plan=None, optimized_dt=None, position_error=None, rotation_error=None, cspace_error=None, solve_time=0.0065000057220458984, ik_time=0.0065000057220458984, graph_time=0.0, trajopt_time=0.0, finetune_time=0.0, total_time=0.011499881744384766, interpolated_plan=None, interpolation_dt=0.02, path_buffer_last_tstep=None, debug_info=None, status=<MotionGenStatus.IK_FAIL: 'IK Fail'>, attempts=1, trajopt_attempts=0, used_graph=False, graph_plan=None, goalset_index=None)
2025-09-29 06:38:33 [Info] [isaacsim.core.prims.impl.articulation] Articulation Prim View Device: cpu
2025-09-29 06:38:33 [Info] [isaacsim.core.prims.impl.single_articulation] initializing handles for /World/franka
Regards,
Abhijit.
Beta Was this translation helpful? Give feedback.
All reactions