RLBench icon indicating copy to clipboard operation
RLBench copied to clipboard

Failed to run examples/swap_arm.py with robot jaco or mico

Open luosh18 opened this issue 4 years ago • 3 comments

Thanks for this amazing tool :) I've tried to execute examples/swap_arm.py with jaco instead.

env = Environment(
    action_mode, obs_config=obs_config, headless=False,
    robot_setup='jaco')

However, when the CoppeliaSim windows popped up, an error occurred: [simExtIK:error] Found invalid joint handle(s)

same error happens when using mico, but works fined with other bots in the support list. could it be related to #87, #94 or #110 ?

here's the output:

Reset Episode
Traceback (most recent call last):
  File "examples/swap_arm.py", line 43, in <module>
    descriptions, obs = task.reset()
  File "/home/lsh18/RLBench/rlbench/task_environment.py", line 77, in reset
    randomly_place=not self._static_positions)
  File "/home/lsh18/RLBench/rlbench/backend/scene.py", line 134, in init_episode
    self.task.validate()
  File "/home/lsh18/RLBench/rlbench/backend/task.py", line 274, in validate
    self._waypoints = self._get_waypoints()
  File "/home/lsh18/RLBench/rlbench/backend/task.py", line 409, in _get_waypoints
    feasible, way_i = self._feasible(waypoints)
  File "/home/lsh18/RLBench/rlbench/backend/task.py", line 360, in _feasible
    path = point.get_path(ignore_collisions=True)
  File "/home/lsh18/RLBench/rlbench/backend/waypoints.py", line 62, in get_path
    algorithm=Algos.RRTConnect)
  File "/home/lsh18/anaconda3/envs/rlbench/lib/python3.7/site-packages/pyrep/robots/arms/arm.py", line 447, in get_path
    relative_to)
  File "/home/lsh18/anaconda3/envs/rlbench/lib/python3.7/site-packages/pyrep/robots/arms/arm.py", line 381, in get_nonlinear_path
    max_configs, distance_threshold, max_time_ms, relative_to)
  File "/home/lsh18/anaconda3/envs/rlbench/lib/python3.7/site-packages/pyrep/robots/arms/arm.py", line 148, in solve_ik_via_sampling
    metric, collision_pairs, joint_options, low_limits, max_limits)
  File "/home/lsh18/anaconda3/envs/rlbench/lib/python3.7/site-packages/pyrep/backend/sim.py", line 1422, in simGetConfigForTipPose
    _check_return(ret)
  File "/home/lsh18/anaconda3/envs/rlbench/lib/python3.7/site-packages/pyrep/backend/sim.py", line 28, in _check_return
    'The call failed on the V-REP side. Return value: %d' % ret)
RuntimeError: The call failed on the V-REP side. Return value: -1

Thanks

luosh18 avatar Mar 30 '22 08:03 luosh18

I had a similar error and it seems like manually swapping out the arm by editing the scene does the trick.

amberxie88 avatar Jul 17 '23 03:07 amberxie88