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

WIP: Add support for R-2000iB 165f #52

Open
wants to merge 5 commits into
base: indigo-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions fanuc_r2000ib_support/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.1.0)

project(fanuc_r2000ib_support)

find_package(catkin REQUIRED)

catkin_package()

if (CATKIN_ENABLE_TESTING)
find_package(roslaunch REQUIRED)
#roslaunch_add_file_check(tests/roslaunch_test.xml)
endif()

install(DIRECTORY config launch meshes urdf
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
1 change: 1 addition & 0 deletions fanuc_r2000ib_support/config/joint_names_r2000ib165f.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
controller_joint_names: ['joint_1', 'joint_2', 'joint_3', 'joint_4', 'joint_5', 'joint_6']
3 changes: 3 additions & 0 deletions fanuc_r2000ib_support/launch/load_r2000ib165f.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<launch>
<param name="robot_description" command="$(find xacro)/xacro.py '$(find fanuc_r2000ib_support)/urdf/r2000ib165f.xacro'" />
</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--
Manipulator specific version of 'robot_interface_streaming.launch'.

Usage:
robot_interface_streaming_r2000ib165f.launch robot_ip:=<value>
-->
<launch>
<arg name="robot_ip" />
<arg name="enable_control_hand" default="true" />
<!-- <arg name="use_bswap" default="true" />-->
simonschmeisser marked this conversation as resolved.
Show resolved Hide resolved

<rosparam command="load" file="$(find fanuc_r2000ib_support)/config/joint_names_r2000ib165f.yaml" />

<include file="$(find mitsubishi_driver)/launch/robot_interface_downloading.launch">
simonschmeisser marked this conversation as resolved.
Show resolved Hide resolved
<arg name="robot_ip" value="$(arg robot_ip)" />
<arg name="enable_control_hand" value="$(arg enable_control_hand)" />
simonschmeisser marked this conversation as resolved.
Show resolved Hide resolved
<!-- <arg name="use_bswap" value="$(arg use_bswap)" />-->
</include>
</launch>
simonschmeisser marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
Manipulator specific version of 'robot_interface_streaming.launch'.

Usage:
robot_interface_streaming_r2000ib165f.launch robot_ip:=<value>
-->
<launch>
<arg name="robot_ip" />
<!-- <arg name="use_bswap" default="true" />-->

<rosparam command="load" file="$(find fanuc_r2000ib_support)/config/joint_names_r2000ib165f.yaml" />

<include file="$(find mitsubishi_driver)/launch/robot_interface_streaming.launch">
<arg name="robot_ip" value="$(arg robot_ip)" />
<!-- <arg name="use_bswap" value="$(arg use_bswap)" />-->
</include>
</launch>
7 changes: 7 additions & 0 deletions fanuc_r2000ib_support/launch/test_r2000ib165f.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<launch>
<include file="$(find fanuc_r2000ib_support)/launch/load_r2000ib165f.launch" />
<param name="use_gui" value="true" />
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find industrial_robot_client)/config/robot_state_visualize.rviz" required="true" />
</launch>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28 changes: 28 additions & 0 deletions fanuc_r2000ib_support/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<package format="2">
<name>fanuc_r2000ib_support</name>
<version>0.0.1</version>
<description>
<p>
Support for the fanuc_r2000ib series of robots
</p>
</description>
<author email="[email protected]">Simon Schmeisser (isys vision)</author>
<maintainer email="[email protected]">Simon Schmeisser (isys vision)</maintainer>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be ok with it, but are you going to maintain this? Otherwise, please don't list your name here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should discuss increasing load-balancing, bus-factor and community involvement at some point and as such I would be willing to (co-)maintain some of those packages. However now it was just an oversight and I put the field back to its default value ;)

<license>Apache2</license>

<!-- urls -->

<buildtool_depend>catkin</buildtool_depend>

<test_depend>roslaunch</test_depend>


<!-- exec depends -->
<exec_depend>fanuc_resources</exec_depend>
<exec_depend>xacro</exec_depend>

<export>
<architecture_independent />
</export>
</package>
12 changes: 12 additions & 0 deletions fanuc_r2000ib_support/tests/roslaunch_test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<launch>

<group ns="load_r2000ib165f__">
<include file="$(find fanuc_r2000ib_support)/launch/load_r2000ib165f.launch"/>
</group>

<group ns="test_r2000ib165f__">
<include file="$(find fanuc_r2000ib_support)/launch/test_r2000ib165f.launch"/>
</group>

</launch>
6 changes: 6 additions & 0 deletions fanuc_r2000ib_support/urdf/r2000ib165f.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" ?>

<robot name="fanuc_r2000ib" xmlns:xacro="http://wiki.ros.org/xacro">
<xacro:include filename="$(find fanuc_r2000ib_support)/urdf/r2000ib165f_macro.xacro"/>
<xacro:fanuc_r2000ib165f prefix=""/>
</robot>
187 changes: 187 additions & 0 deletions fanuc_r2000ib_support/urdf/r2000ib165f_macro.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://wiki.ros.org/xacro">
<xacro:include filename="$(find fanuc_resources)/urdf/common_materials.xacro"/>

<xacro:macro name="fanuc_r2000ib165f" params="prefix">
<!-- links -->
<link name="${prefix}base_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/visual/base_link.stl"/>
</geometry>
<xacro:material_fanuc_yellow />
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/collision/base_link.stl"/>
</geometry>
</collision>
</link>
<link name="${prefix}link_1">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/visual/link_1.stl"/>
</geometry>
<xacro:material_fanuc_yellow />
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/collision/link_1.stl"/>
</geometry>
</collision>
</link>
<link name="${prefix}link_2">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/visual/link_2.stl"/>
</geometry>
<xacro:material_fanuc_white />
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/collision/link_2.stl"/>
</geometry>
</collision>
</link>
<link name="${prefix}link_3">
<!-- The manual and also the model files show this link in the 90deg position (ie right angle) -->
<!-- However, the coordinate system treats the straight configuration as 0deg and the limits as asymmetric -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain this comment a little more?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No ... I rather remove it as this (and the mitsubishi launch files) were copied from a not so well matching template

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you could compare/use the fanuc_r2000ic_support package I pushed to my fork?

<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/visual/link_3.stl"/>
</geometry>
<xacro:material_fanuc_yellow />
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/collision/link_3.stl"/>
</geometry>
</collision>
</link>
<link name="${prefix}link_4">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/visual/link_4.stl"/>
</geometry>
<xacro:material_fanuc_yellow />
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/collision/link_4.stl"/>
</geometry>
</collision>
</link>
<link name="${prefix}link_5">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/visual/link_5.stl"/>
</geometry>
<xacro:material_fanuc_yellow />
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/collision/link_5.stl"/>
</geometry>
</collision>
</link>
<link name="${prefix}link_6">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/visual/link_6.stl"/>
</geometry>
<xacro:material_fanuc_yellow />
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://fanuc_r2000ib_support/meshes/r2000ib165f/collision/link_6.stl"/>
</geometry>
</collision>
</link>

<!-- joints: main serial chain -->
<joint name="${prefix}joint_1" type="revolute">
<origin xyz="0 0 0.67" rpy="0 0 0"/>
<parent link="${prefix}base_link"/>
<child link="${prefix}link_1"/>
<axis xyz="0 0 1"/>
<limit lower="${radians(-180)}" upper="${radians(180)}" effort="0" velocity="${radians(110)}" />
</joint>
<joint name="${prefix}joint_2" type="revolute">
<origin xyz="0.312 0 0" rpy="0 0 0"/>
<parent link="${prefix}link_1"/>
<child link="${prefix}link_2"/>
<axis xyz="0 1 0"/>
<limit lower="${radians(-60)}" upper="${radians(75)}" effort="0" velocity="${radians(110)}" />
</joint>
<joint name="${prefix}joint_3" type="revolute">
<origin xyz="0 0 1.075" rpy="0 0 0"/>
<parent link="${prefix}link_2"/>
<child link="${prefix}link_3"/>
<axis xyz="0 -1 0"/>
<!-- note that the data sheet claims an lower limit of -132 but that is not reachable due to
collisions with the base -->
<limit lower="${radians(-90)}" upper="${radians(230)}" effort="0" velocity="${radians(110)}" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the specced joint limit.

Collision avoidance should deal with potential collisions, and inverted mountings may actually make use of the actual joint limits without colliding.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious: What would be inverted in that case?

Copy link
Member

@gavanderhoorn gavanderhoorn Nov 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up-side-down mounting of the entire robot.

Robots can also be placed on pedestals, which lets them reach "under themselves".


Edit: for this particular series you'd need a special variant, but in general we just use the joint limits as given in the manual or datasheet.

</joint>
<joint name="${prefix}joint_4" type="revolute">
<origin xyz="0 0 0.225" rpy="0 0 0"/>
<parent link="${prefix}link_3"/>
<child link="${prefix}link_4"/>
<axis xyz="-1 0 0"/>
<limit lower="${radians(-360)}" upper="${radians(360)}" effort="0" velocity="${radians(150)}" />
</joint>
<joint name="${prefix}joint_5" type="revolute">
<origin xyz="1.280 0 0.0" rpy="0 0 0"/>
<parent link="${prefix}link_4"/>
<child link="${prefix}link_5"/>
<axis xyz="0 -1 0"/>
<limit lower="${radians(-125)}" upper="${radians(125)}" effort="0" velocity="${radians(125)}" />
</joint>
<joint name="${prefix}joint_6" type="revolute">
<origin xyz="0.215 0 0.0" rpy="0 0 0"/>
<parent link="${prefix}link_5"/>
<child link="${prefix}link_6"/>
<axis xyz="-1 0 0"/>
<limit lower="${radians(-360)}" upper="${radians(360)}" effort="0" velocity="${radians(220)}" />
</joint>

<!-- ROS-Industrial 'base' frame: base_link to Fanuc World Coordinates transform -->
<link name="${prefix}base" />
<joint name="${prefix}base_link-base" type="fixed">
<origin xyz="0 0 0.670" rpy="0 0 0"/>
<parent link="${prefix}base_link"/>
<child link="${prefix}base"/>
</joint>

<!-- ROS-Industrial 'flange' frame: attachment point for EEF models -->
<link name="${prefix}flange" />
<joint name="${prefix}joint_6-flange" type="fixed">
<origin xyz="0 0 0" rpy="0 0 0" />
<parent link="${prefix}link_6" />
<child link="${prefix}flange" />
</joint>

<!-- ROS-Industrial 'tool0' frame: all-zeros tool frame -->
<link name="${prefix}tool0" />
<joint name="${prefix}link_6-tool0" type="fixed">
<origin xyz="0 0 0" rpy="${pi} ${-pi/2.0} 0" />
<parent link="${prefix}link_6" />
<child link="${prefix}tool0" />
</joint>


</xacro:macro>
</robot>