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

URDF file #45

Open
MADONOKOUKI opened this issue Dec 17, 2020 · 2 comments
Open

URDF file #45

MADONOKOUKI opened this issue Dec 17, 2020 · 2 comments

Comments

@MADONOKOUKI
Copy link

MADONOKOUKI commented Dec 17, 2020

Hi, My name is koki.

I purchase a niryo one robot. And I want to use urdf file.
In this repository, https://github.com/NiryoRobotics/niryo_one_ros/tree/master/niryo_one_description/urdf shows the urdf file. However, when calculating the inverse kinematics using this file, I received wrong result as I expected.

Can I make urdf file from ros in niryo one linux system?
I think each joint's coordinate is difficult to get. For this reason, I want to know how to get the correct urdf file from my own niryo one robot.

By the way, I use ikpy to calculate the inverse kinematics.
https://github.com/Phylliade/ikpy

I write the code like that

from ikpy.chain import Chain
my_chain = Chain.from_urdf_file("model.urdf")
# my_chain.inverse_kinematics([2, 2, 2])
print(my_chain)
ik = my_chain.inverse_kinematics(target_position=[0.076, 0.001, 0.162])
print(ik)
print(my_chain.forward_kinematics(ik)[:3, 3])

Best.

@MADONOKOUKI
Copy link
Author

MADONOKOUKI commented Dec 17, 2020

Here is my .urdf file. I convert the xacro file to urdf file using rosrun command in niryo one linux terminal.

<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from niryo_one.urdf.xacro           | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<!--
    niryo_one.urdf.xacro
    Copyright (C) 2017 Niryo
    All rights reserved.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->
<robot name="niryo_one" xmlns:xacro="http://www.ros.org/wiki/xacro">
  <!-- Properties -->
  <!-- Links -->
  <link name="world"/>
  <link name="base_link">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/collada/base_link.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/stl/base_link.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="shoulder_link">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/collada/shoulder_link.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/stl/shoulder_link.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="arm_link">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/collada/arm_link.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/stl/arm_link.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="elbow_link">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/collada/elbow_link.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/stl/elbow_link.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="forearm_link">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/collada/forearm_link.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/stl/forearm_link.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="wrist_link">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/collada/wrist_link.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/stl/wrist_link.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="hand_link">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/collada/hand_link.dae"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="package://niryo_one_description/meshes/v2/stl/hand_link.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="tool_link">
	</link>
  <!--Joints -->
  <joint name="joint_world" type="fixed">
    <parent link="world"/>
    <child link="base_link"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
  </joint>
  <joint name="joint_1" type="revolute">
    <parent link="base_link"/>
    <child link="shoulder_link"/>
    <origin rpy="0 0 0" xyz="0 0 0.103"/>
    <axis xyz="0 0 1"/>
    <limit effort="1" lower="-3.05433" upper="3.05433" velocity="1.0"/>
  </joint>
  <joint name="joint_2" type="revolute">
    <parent link="shoulder_link"/>
    <child link="arm_link"/>
    <origin rpy="1.5707963268 -1.5707963268 0" xyz="0 0 0.08"/>
    <limit effort="1" lower="-1.5708" upper="0.640187" velocity="1.0"/>
    <axis xyz="0 0 1"/>
  </joint>
  <joint name="joint_3" type="revolute">
    <parent link="arm_link"/>
    <child link="elbow_link"/>
    <origin rpy="0 0 -1.5707963268" xyz="0.21 0.0 0"/>
    <limit effort="1" lower="-1.397485" upper="1.5707963268" velocity="1.0"/>
    <axis xyz="0 0 1"/>
  </joint>
  <joint name="joint_4" type="revolute">
    <parent link="elbow_link"/>
    <child link="forearm_link"/>
    <origin rpy="0 1.5707963268 0" xyz="0.0415 0.03 0"/>
    <limit effort="1" lower="-3.05433" upper="3.05433" velocity="1.0"/>
    <axis xyz="0 0 1"/>
  </joint>
  <joint name="joint_5" type="revolute">
    <parent link="forearm_link"/>
    <child link="wrist_link"/>
    <origin rpy="0 -1.5707963268 0" xyz="0 0 0.18"/>
    <limit effort="1" lower="-1.74533" upper="1.91986" velocity="1.0"/>
    <axis xyz="0 0 1"/>
  </joint>
  <joint name="joint_6" type="revolute">
    <parent link="wrist_link"/>
    <child link="hand_link"/>
    <origin rpy="0 1.5707963268 0" xyz="0.0164 -0.0055 0"/>
    <limit effort="1" lower="-2.57436" upper="2.57436" velocity="1.0"/>
    <axis xyz="0 0 1"/>
  </joint>
  <joint name="hand_tool_joint" type="fixed">
    <parent link="hand_link"/>
    <child link="tool_link"/>
    <origin rpy="-1.5707963268 -1.5707963268 0" xyz="0 0 0.0073"/>
    <!-- <origin rpy="-0.002 1.329 0.007" xyz="0.075 0.001 0.162"/> -->
  </joint>
</robot>

@zakimohzani
Copy link

Hi, I'm using IKFast and some of the IKs when the end-effector are pointing down are failing. I haven't made a point cloud plot of these failures. Perhaps later.

However, I wanted to ask how is progress on your side?

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