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

ValueError: Unknown joint type: continuous #134

Open
gurselturkeri opened this issue Feb 26, 2023 · 5 comments
Open

ValueError: Unknown joint type: continuous #134

gurselturkeri opened this issue Feb 26, 2023 · 5 comments

Comments

@gurselturkeri
Copy link

Hi, I get an error when I run my python script.

Traceback (most recent call last):
  File "/home/gursel/robotics_ws/src/robotic_arm/2_inverse_kinematics_solution.py", line 72, in <module>
    main()
  File "/home/gursel/robotics_ws/src/robotic_arm/2_inverse_kinematics_solution.py", line 64, in main
    joint_trajectory_object = Trajectory_publisher()
  File "/home/gursel/robotics_ws/src/robotic_arm/2_inverse_kinematics_solution.py", line 28, in __init__
    self.robot_initialize(urdf_file)
  File "/home/gursel/robotics_ws/src/robotic_arm/2_inverse_kinematics_solution.py", line 43, in robot_initialize
    self.kuka_robot = ikpy.chain.Chain.from_urdf_file(urdf_file)
  File "/home/gursel/.local/lib/python3.10/site-packages/ikpy/chain.py", line 324, in from_urdf_file
    links = URDF.get_urdf_parameters(urdf_file, base_elements=base_elements, last_link_vector=last_link_vector, base_element_type=base_element_type, symbolic=symbolic)
  File "/home/gursel/.local/lib/python3.10/site-packages/ikpy/urdf/URDF.py", line 250, in get_urdf_parameters
    raise ValueError("Unknown joint type: {}".format(joint_type))
ValueError: Unknown joint type: continuous
@Phylliade
Copy link
Owner

Hello @gurselturkeri ,

Can you paste your URDF file?

@StrangerChamber
Copy link

I'm having the same issue.

here is my urdf file:

@gurselturkeri
Copy link
Author

@StrangerChamber In ros2 humble version it works clearly.

@EdgarJRobles
Copy link

EdgarJRobles commented May 21, 2024

I faced the same issue running a urdf from ROS here: https://github.com/ros-industrial/abb/tree/kinetic-devel on webots.
webots implement ikpy library to calculate de inverse kinematics.

Heavy industrial robots usually a piston to support 2 axis heavy loads an that why it have invinite revolute ROS called "continuous" joint type.

It looks like there is not definition for continuous joint type on URDF.py
` joint_type = joint.attrib["type"]
if joint_type not in ["revolute", "prismatic", "fixed"]:
raise ValueError("Unknown joint type: {}".format(joint_type))

    axis = joint.find("axis")
    if axis is not None:
        if joint_type == "revolute":
            rotation = [float(x) for x in axis.attrib["xyz"].split()]
            translation = None
        elif joint_type == "prismatic":
            rotation = None
            translation = [float(x) for x in axis.attrib["xyz"].split()]
        elif joint_type == "fixed":
            warnings.warn(
                "Joint {} is of type: fixed, but has an 'axis' attribute defined. This is not in the URDF spec and thus this axis is ignored".format(
                    joint.attrib["name"]
                )
            )
        else:
            raise ValueError(
                "Unknown joint type with an axis: {}, {}".format(joint_type, axis)
            )

`
some definition from ROS here http://wiki.ros.org/urdf/XML/joint

@mhortman
Copy link

I think you can replace convolute with revolute, and add some limits on to the revolute, and it should work. I am testing this theory now.

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