uwgraphics / relaxed_ik

RelaxedIK Solver
MIT License
175 stars 50 forks source link

Cannot add box collision collision object #22

Closed nancyhong123 closed 3 years ago

nancyhong123 commented 3 years ago

Hi Daniel,

I cannot visualize the box collision object with the collision_viewer so I am not sure if it has been added added correctly. Whenever I attempt to add a box, a cylinder is inserted into one of the robot link collision objects. Screen Shot 2020-11-27 at 6 38 50 PM

Do you know how I may be able to fix this? Thank you!

Here is my collision configuration file

robot_link_radius: 0.05
sample_states: [[-0.85657, -0.18703, 0.18963, 1.77668, 0.84847, 1.0535], [1.01675, 0.40612, 0.06659, 0.93393, -1.17729, -0.62849], [-0.17209, 0.25656, 0.08641, 0.5847, -0.1266, 1.39353], [0.09171, -0.42917, 0.0411, -0.13787, 0.01052, 0.34674], [-0.69866, 0.67231, 0.00311, -1.37154, 0.87735, -0.39271], [-0.54174, 0.54556, 0.05997, -0.65263, -0.58567, -0.35845], [-1.52783, 0.39143, 0.02623, 1.81542, 1.03184, 0.00192], [-1.03257, -0.35803, 0.15493, -1.37735, 0.28299, 0.49498], [-0.58533, -0.71106, 0.12337, -0.49909, -1.22449, -0.57998], [0.07072, 0.59088, 0.1052, -1.69021, -0.04991, 0.45641], [0.76369, 0.34258, 0.1018, -0.42078, 0.90131, -1.51509], [-0.77521, -0.64356, 0.11783, -1.27076, -1.39859, -1.45367], [-1.13214, -0.54064, 0.13576, 0.58941, -0.36877, 1.44977]]

boxes:
  - name: box1
    parameters: [10,10,0.5] # r
    coordinate_frame: 0
    rotation: [0,3.14,0]
    # translation: [0.250, 0.000, 0]
    translation: [0, 0.000, -0.5]

# spheres:
#   - name: sphere1
#     parameters: .2
#     coordinate_frame: 0
#     rotation: [0,0,0]
#     translation: [0.250, 0.000, 0]
# ellipsoids:
#   - name: ellipse1
#     parameters: [0.1,0.2,0.3]
#     coordinate_frame: 0
#     rotation: [0,0,0]
#     translation: [0, 0.4, 0.2]
# capsules:
#   - name: capsule1
#     parameters: [0.1,0.5]
#     coordinate_frame: 0
#     rotation: [0,0,0]
#     translation: [0.2, 0.2, 0]
# cylinders:
#   - name: cylinder1
#     parameters: [0.1,0.5]
#     coordinate_frame: 0
#     rotation: [0,0,0]
#     translation: [0, 0.2, 0]
djrakita commented 3 years ago

Hi, I seem to remember getting this kind of error a while ago. Could you first try copying and pasting the exact box parameters again, so it reads as:

robot_link_radius: 0.05 sample_states: [[-0.85657, -0.18703, 0.18963, 1.77668, 0.84847, 1.0535], [1.01675, 0.40612, 0.06659, 0.93393, -1.17729, -0.62849], [-0.17209, 0.25656, 0.08641, 0.5847, -0.1266, 1.39353], [0.09171, -0.42917, 0.0411, -0.13787, 0.01052, 0.34674], [-0.69866, 0.67231, 0.00311, -1.37154, 0.87735, -0.39271], [-0.54174, 0.54556, 0.05997, -0.65263, -0.58567, -0.35845], [-1.52783, 0.39143, 0.02623, 1.81542, 1.03184, 0.00192], [-1.03257, -0.35803, 0.15493, -1.37735, 0.28299, 0.49498], [-0.58533, -0.71106, 0.12337, -0.49909, -1.22449, -0.57998], [0.07072, 0.59088, 0.1052, -1.69021, -0.04991, 0.45641], [0.76369, 0.34258, 0.1018, -0.42078, 0.90131, -1.51509], [-0.77521, -0.64356, 0.11783, -1.27076, -1.39859, -1.45367], [-1.13214, -0.54064, 0.13576, 0.58941, -0.36877, 1.44977]]

boxes:

If this doesn't work, just let me know!

nancyhong123 commented 3 years ago

Hi Daniel, Thank you for your help! With your suggestion I am now able to generate a box collision object but I am still noticing the concentric cylinders in the robot links. Would that affect performance in any way or can I just ignore it?

djrakita commented 3 years ago

Great, glad that first fix worked for the box problem! As for the other issue, I would ignore this for now. If you get through step 7 of the setup and everything looks okay, all is good and you’re good to go to do preprocessing and this won’t have any long term impact on performance. If any issues come up because of this along the way, feel free to reach out again!