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

What means link_names in yml file and how to check joint sequence in dual arm ? #432

Open
jhs3330395 opened this issue Nov 8, 2024 · 0 comments
Assignees

Comments

@jhs3330395
Copy link

If it’s not a bug, please use discussions: https://github.com/NVlabs/curobo/discussions

Please provide the below information in addition to your issue:

  1. cuRobo installation mode (choose from [python, isaac sim, docker python, docker isaac sim]): python
  2. python version: 3.8
  3. Isaac Sim version (if using): no

Issue Details

I'm going to succeed in one robot arm task and control two robot arms at the same time as the next task.

Although the trajectory was successful, the behavior was strange when visualized using isaac gym.

I thought this was a matter of joint naming order. How can I check the order of the joints that curobo used in the calculation?
Does it follow the order of urdf or yml files?

I made a robotic arm with two joints on the left and four joints on the right.
Each robotic arm has a tip(tool or tcp). "left_end" and "right_end"

I checked with one robotic arm, so there is no problem with my urdf and collision_sphere.

this is my yml file


`robot_cfg:
kinematics:
usd_path: null
usd_robot_root: "/robot"
isaac_usd_path: ""
usd_flip_joints: {}
usd_flip_joint_limits: []

urdf_path: "/home/hs0395/workspace/rexi/isaac/curobo_ws/src/assets/unbalance_robot_arm/unbalance_robot_arm.urdf"
asset_root_path: "/home/hs0395/workspace/rexi/isaac/curobo_ws/src/assets/unbalance_robot_arm/"

base_link: "center"
ee_link: "right_end"
link_names: ["right_end"]
lock_joints: null
extra_links: null

collision_link_names: ["left_bar1", "left_bar2", "right_bar1", "right_bar2", "right_bar3", "right_bar4"]
collision_spheres: "/home/hs0395/workspace/rexi/isaac/curobo_ws/src/assets/unbalance_robot_arm/unbalance_robot_arm_collision_sphere.yml"
collision_sphere_buffer: 0.005
extra_collision_spheres: {}
self_collision_ignore: 
  {
    "left_bar1": ["left_bar2"],
    "left_bar2": ["left_bar3"],
    "right_bar1": ["right_bar2"],
    "right_bar2": ["right_bar3"],
    "right_bar3": ["right_bar4"]
  }

self_collision_buffer:
  {
    "left_bar1": 0.0,
    "left_bar2": 0.0,
    "right_bar1": 0.0,
    "right_bar2": 0.0,
    "right_bar3": 0.0,
    "right_bar4": 0.0
  }
  
use_global_cumul: True
mesh_link_names: ["left_bar1", "left_bar2", "right_bar1", "right_bar2", "right_bar3", "right_bar4"]

cspace:
  joint_names: ["left_dof1", "left_dof2", "right_dof1", "right_dof2", "right_dof3", "right_dof4"]
  retract_config: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
  null_space_weight: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
  cspace_distance_weight: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
  max_jerk: 500.0
  max_acceleration: 15.0

`


And this is code
`import torch, math

from curobo.types.base import TensorDeviceType
from curobo.wrap.reacher.motion_gen import MotionGen, MotionGenConfig, MotionGenPlanConfig, PoseCostMetric
from curobo.util_file import load_yaml
from curobo.geom.sdf.world import CollisionCheckerType
from curobo.geom.types import Cuboid, WorldConfig
from curobo.types.robot import JointState
from curobo.types.math import Pose

robot_config_yaml = "/home/hs0395/workspace/rexi/isaac/curobo_ws/src/assets/unbalance_robot_arm/unbalance_robot_arm.yml"
tensor_args = TensorDeviceType(device=torch.device("cuda:0"))
motion_gen_cfg = MotionGenConfig.load_from_robot_config(
robot_cfg=load_yaml(robot_config_yaml)["robot_cfg"],
world_model={"cuboid": {"table": {"dims": [5.0, 5.0, 0.2], "pose": [0.0, 0.0, -10.0, 1, 0, 0, 0.0]}}},
tensor_args=tensor_args,
collision_cache={"obb": 5, "mesh": 5},
collision_checker_type=CollisionCheckerType.MESH,
ee_link_name="right_end"
)
motion_gen = MotionGen(motion_gen_cfg)
motion_gen.warmup(warmup_js_trajopt=False)

world = WorldConfig()
motion_gen.update_world(world)

init_state = [0, 0, 0, 3 * math.pi / 4, -math.pi / 2, -math.pi / 4]
goal_pos_wxyz = [0.0, 4.0, 1.4142, 1, 0, 0, 0]

q_start = JointState.from_position(tensor_args.to_device([init_state]), joint_names=["left_bar1", "left_bar2", "right_bar1", "right_bar2", "right_bar3", "right_bar4"])
goal_pose = Pose(position=tensor_args.to_device([[goal_pos_wxyz[0], goal_pos_wxyz[1], goal_pos_wxyz[2]]]), quaternion=tensor_args.to_device([[goal_pos_wxyz[3], goal_pos_wxyz[4], goal_pos_wxyz[5], goal_pos_wxyz[6]]]))
result = motion_gen.plan_single(q_start, goal_pose)
interpolated_solution = result.get_interpolated_plan()
position = interpolated_solution.position.tolist()
print(position[-1])
`


I left my left arm alone, and my right arm folded.
left end position is (0, -3.0, 0.0) right end position is (0, 3.0, 1.4142)
I only want to control the right end. goal position is (0, 4.0, 1.4142)
This simply means extending the arm horizontally.

An error would have occurred if the trajectory had not been created. However, the trajectory was successfully created.
However, the final result values are as follows and are not related to the target position at all.
[1.2649, -0.5048, -0.9878, 0.2250, -1.7192, -0.0190]

visualization using isaac gym

before
Screenshot from 2024-11-08 17-32-11

after
Screenshot from 2024-11-08 17-32-01

I referred to the dual_ur10eyml file.

link_names: [ "tool1", "tool0"]
I don't know what link_names means.
I thought it was a candidate for a link that could be designated as an ee_link_name.

The same method was applied to my yml file.
link_names = ["left_end", "right_end"]

[-0.2960, 1.3143, 0.0071, -1.0257, -5.6557e-07, -6.4909e-07]

It was a different result from the previous one, but it is still different from the desired result.

please what is problem???

PS) What does retract_config mean? I can't physically understand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants