compas-dev / compas_fab

Robotic fabrication package for the COMPAS Framework.
https://compas.dev/compas_fab/
MIT License
108 stars 32 forks source link

Error code: -18; INVALID_LINK_NAME #313

Closed PingHsunTsai closed 2 years ago

PingHsunTsai commented 3 years ago

Describe the bug Traceback: line 133, in await_callback, "C:\Users\PingHsunTsai\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\compas\utilities\azync.py" line 77, in forward_kinematics, "C:\Users\PingHsunTsai\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\compas_fab\backends\ros\backend_features\move_it_forward_kinematics.py" line 20, in call, "C:\Users\PingHsunTsai\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\compas_fab\backends\interfaces\backend_features.py" line 31, in forward_kinematics, "C:\Users\PingHsunTsai\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\compas_fab\backends\ros\planner.py" line 31, in forward_kinematics, "C:\Users\PingHsunTsai\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\compas_fab\backends\interfaces\client.py" line 1283, in forward_kinematics, "C:\Users\PingHsunTsai\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\compas_fab\robots\robot.py" line 29, in script

To Reproduce Steps to reproduce the behavior:

  1. Rhino 6, Grasshopper
  2. See error: image

Expected behavior

call forward_kinematics() successfully

Desktop:

Additional context Using the ur_robot_driver with real hardware (with move_it package)

gonzalocasas commented 3 years ago

Could you please try the following: 1) print and paste in this issue the result of robot.info() 2) try adding this line after line 23: configuration.joint_names = robot.get_configurable_joint_names()

Also, I'm assuming you have the latest compas_fab version, if that's not the case, please post the version info of compas and compas_fab.

philianeles commented 3 years ago

Sure!

  1. print and paste in this issue the result of robot.info()

  2. The robot's name is 'ur10'.

  3. The planning groups are: ['endeffector', 'manipulator']

  4. The main planning group is 'manipulator'.

  5. The end-effector's name is 'ee_link'.

  6. The robot has NO tool attached.

  7. The base link's name is 'base_link'

  8. The base_frame is: Frame(Point(0.000, 0.000, 0.000), Vector(1.000, 0.000, 0.000), Vector(0.000, 1.000, 0.000))

  9. The robot's joints are:

    • 'shoulder_pan_joint' is of type 'revolute' and has limits [6.283, -6.283]
    • 'shoulder_lift_joint' is of type 'revolute' and has limits [6.283, -6.283]
    • 'elbow_joint' is of type 'revolute' and has limits [6.283, -6.283]
    • 'wrist_1_joint' is of type 'revolute' and has limits [6.283, -6.283]
    • 'wrist_2_joint' is of type 'revolute' and has limits [6.283, -6.283]
    • 'wrist_3_joint' is of type 'revolute' and has limits [6.283, -6.283]
  10. The robot's links are:

  11. ['base_link', 'shoulder_link', 'upper_arm_link', 'forearm_link', 'wrist_1_link', 'wrist_2_link', 'wrist_3_link', 'ee_link', 'base', 'tool0', 'world']

  12. try adding this line after line 23: configuration.joint_names = robot.get_configurable_joint_names() image

And the versions:

gonzalocasas commented 3 years ago

The call to FK tries to figure out which link you want to get fk for, which by default it should be ee_link, but maybe something in your setup is slightly different. Try to specify it explicitly:

robot.forward_kinematics(configuration, group, options=dict(link='ee_link'))

Also, just to make sure, group is set to manipulator, right?

philianeles commented 3 years ago

just tried it: image

and yes, group is set to manipulator

philianeles commented 2 years ago

@gonzalocasas so after going back to the calibration_devel branch and running:

roslaunch ur_robot_driver ur10_bringup.launch limited:=true robot_ip:=192.168.0.10
roslaunch ur10_moveit_config ur10_moveit_planning_execution.launch limited:=true
roslaunch ur10_moveit_config moveit_rviz.launch config:=true

With this way of loading the robot model: image

We have a different error in robot (but the previous problem seems to be gone!) image

But the good news is that we can execute a trajectory with the real hardware :) if we can figure out this new problem, maybe it`s good to proceed like this (without 2 clients?)

beverlylytle commented 2 years ago

As discussed over slack, this last error is eliminated when load_geometry is set to True in load_robot.