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

Add arg prefix #7

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
139 changes: 13 additions & 126 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,130 +1,17 @@
# Universal Robot
# universal_robot
Forked from [universal_robot](https://github.com/fmauch/universal_robot)
For more information, refer to it.

[![Build Status](http://build.ros.org/job/Kdev__universal_robot__ubuntu_xenial_amd64/badge/icon)](http://build.ros.org/job/Kdev__universal_robot__ubuntu_xenial_amd64)
[![license - apache 2.0](https://img.shields.io/:license-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
## Getting Started
Package needed by Universal_Robots_ROS_Driver, not to be used directly.
Modification has been done to simplify Aldo's integration

[![support level: community](https://img.shields.io/badge/support%20level-community-lightgray.png)](http://rosindustrial.org/news/2016/10/7/better-supporting-a-growing-ros-industrial-software-platform)

[ROS-Industrial](http://wiki.ros.org/Industrial) Universal Robot meta-package. See the [ROS wiki](http://wiki.ros.org/universal_robot) page for compatibility information and other more information.


__Installation__

There are two different ways to install the packages in this repository. The following sections detail installing the packages using the binary distribution and building them from source in a Catkin workspace.


___Using apt (Ubuntu, Debian)___

On supported Linux distributions (Ubuntu, up to 16.04 (Xenial), `i386` and `amd64`) and ROS versions:

```
sudo apt-get install ros-$ROS_DISTRO-universal-robot
```

replace `$ROS_DISTRO` with `hydro`, `indigo` or `kinetic`, depending on which ROS version you have installed.


___Building from Source___

There are releases available for ROS Hydro, Indigo and Kinetic. However, for the latest features and developments you might want to build the packages from source.

**NOTE**: please prefer using the binary release (see previous section) over building from source where possible. Source installs will not be automatically updated by new package releases and require more work to setup.

The following instructions assume that a [Catkin workspace](http://wiki.ros.org/catkin/Tutorials/create_a_workspace) has been created at `$HOME/catkin_ws` and that the source space is at `$HOME/catkin_ws/src`. Update paths appropriately if they are different on the build machine.

In all other cases the packages will have to be build from sources in a Catkin workspace:

```
cd $HOME/catkin_ws/src

# retrieve the sources (replace '$ROS_DISTRO' with the ROS version you are using)
git clone -b $ROS_DISTRO-devel https://github.com/ros-industrial/universal_robot.git

cd $HOME/catkin_ws

# checking dependencies (again: replace '$ROS_DISTRO' with the ROS version you are using)
rosdep update
rosdep install --rosdistro $ROS_DISTRO --ignore-src --from-paths src

# building
catkin_make

# activate this workspace
source $HOME/catkin_ws/devel/setup.bash
```


__Usage__

___With real Hardware___
There are launch files available to bringup a real robot - either UR5 or UR10.
In the following the commands for the UR5 are given. For the UR10, simply replace the prefix accordingly.

Don't forget to source the correct setup shell files and use a new terminal for each command!

To bring up the real robot, run:

```roslaunch ur_bringup ur5_bringup.launch robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]```


CAUTION:
Remember that you should always have your hands on the big red button in case there is something in the way or anything unexpected happens.


___MoveIt! with real Hardware___
Additionally, you can use MoveIt! to control the robot.
There exist MoveIt! configuration packages for both robots.

For setting up the MoveIt! nodes to allow motion planning run:

```roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch```

For starting up RViz with a configuration including the MoveIt! Motion Planning plugin run:

```roslaunch ur5_moveit_config moveit_rviz.launch config:=true```


NOTE:
As MoveIt! seems to have difficulties with finding plans for the UR with full joint limits [-2pi, 2pi], there is a joint_limited version using joint limits restricted to [-pi,pi]. In order to use this joint limited version, simply use the launch file arguments 'limited', i.e.:

```roslaunch ur_bringup ur5_bringup.launch limited:=true robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]```

```roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch limited:=true```

```roslaunch ur5_moveit_config moveit_rviz.launch config:=true```


___Usage with Gazebo Simulation___
There are launch files available to bringup a simulated robot - either UR5 or UR10.
In the following the commands for the UR5 are given. For the UR10, simply replace the prefix accordingly.

Don't forget to source the correct setup shell files and use a new terminal for each command!

To bring up the simulated robot in Gazebo, run:

```roslaunch ur_gazebo ur5.launch```


___MoveIt! with a simulated robot___
Again, you can use MoveIt! to control the simulated robot.

For setting up the MoveIt! nodes to allow motion planning run:

```roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true```

For starting up RViz with a configuration including the MoveIt! Motion Planning plugin run:

```roslaunch ur5_moveit_config moveit_rviz.launch config:=true```


NOTE:
As MoveIt! seems to have difficulties with finding plans for the UR with full joint limits [-2pi, 2pi], there is a joint_limited version using joint limits restricted to [-pi,pi]. In order to use this joint limited version, simply use the launch file arguments 'limited', i.e.:

```roslaunch ur_gazebo ur5.launch limited:=true```

```roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true limited:=true```

```roslaunch ur5_moveit_config moveit_rviz.launch config:=true```
## Authors
* **Dufay Gaëtan** - *Initial work* - [steliaRT](https://github.com/steliaRT)

## License
This project is licensed under Stelia Aerospace License

## See also
* [universal_robot](https://github.com/fmauch/universal_robot)
* [Universal_Robots_ROS_Driver](https://github.com/steliaRT/Universal_Robots_ROS_Driver)
Comment on lines +1 to +17
Copy link
Owner

Choose a reason for hiding this comment

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

Please do not completely replace the README file.

7 changes: 5 additions & 2 deletions ur_description/launch/ur10_upload.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
<arg name="limited" default="false" doc="If true, limits joint range [-PI, PI] on all joints." />
<arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface" />
<arg name="kinematics_config" default="$(find ur_description)/config/ur10_default.yaml"/>
<arg name="prefix" default="" doc="Prefix robot joints"/>

<param unless="$(arg limited)" name="robot_description" command="$(find xacro)/xacro --inorder '$(find ur_description)/urdf/ur10_robot.urdf.xacro'
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)" />
kinematics_config:=$(arg kinematics_config)
prefix:=$(arg prefix)" />
<param if="$(arg limited)" name="robot_description" command="$(find xacro)/xacro --inorder '$(find ur_description)/urdf/ur10_joint_limited_robot.urdf.xacro'
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)" />
kinematics_config:=$(arg kinematics_config)
prefix:=$(arg prefix)" />
</launch>
7 changes: 5 additions & 2 deletions ur_description/launch/ur3_upload.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
<arg name="limited" default="false" doc="If true, limits joint range [-PI, PI] on all joints." />
<arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface" />
<arg name="kinematics_config" default="$(find ur_description)/config/ur3_default.yaml"/>
<arg name="prefix" default="" doc="Prefix robot joints"/>

<param unless="$(arg limited)" name="robot_description" command="$(find xacro)/xacro --inorder '$(find ur_description)/urdf/ur3_robot.urdf.xacro'
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)" />
kinematics_config:=$(arg kinematics_config)
prefix:=$(arg prefix)" />
<param if="$(arg limited)" name="robot_description" command="$(find xacro)/xacro --inorder '$(find ur_description)/urdf/ur3_joint_limited_robot.urdf.xacro'
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)" />
kinematics_config:=$(arg kinematics_config)
prefix:=$(arg prefix)" />
</launch>
7 changes: 5 additions & 2 deletions ur_description/launch/ur5_upload.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
<arg name="limited" default="false" doc="If true, limits joint range [-PI, PI] on all joints." />
<arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface" />
<arg name="kinematics_config" default="$(find ur_description)/config/ur5_default.yaml"/>
<arg name="prefix" default="" doc="Prefix robot joints"/>

<param unless="$(arg limited)" name="robot_description" command="$(find xacro)/xacro --inorder '$(find ur_description)/urdf/ur5_robot.urdf.xacro'
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)" />
kinematics_config:=$(arg kinematics_config)
prefix:=$(arg prefix)" />
<param if="$(arg limited)" name="robot_description" command="$(find xacro)/xacro --inorder '$(find ur_description)/urdf/ur5_joint_limited_robot.urdf.xacro'
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)" />
kinematics_config:=$(arg kinematics_config)
prefix:=$(arg prefix)" />
</launch>
5 changes: 3 additions & 2 deletions ur_description/urdf/ur10_joint_limited_robot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name="ur10" >

<xacro:arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface"/>
<xacro:arg name="prefix" default=""/>

<!-- common stuff -->
<xacro:include filename="$(find ur_description)/urdf/common.gazebo.xacro" />
Expand All @@ -12,7 +13,7 @@

<!-- arm -->
<xacro:arg name="kinematics_config" default="$(find ur_description)/config/ur10_default.yaml"/>
<xacro:ur10_robot prefix="" joint_limited="true"
<xacro:ur10_robot prefix="$(arg prefix)" joint_limited="true"
shoulder_pan_lower_limit="${-pi}" shoulder_pan_upper_limit="${pi}"
shoulder_lift_lower_limit="${-pi}" shoulder_lift_upper_limit="${pi}"
elbow_joint_lower_limit="${-pi}" elbow_joint_upper_limit="${pi}"
Expand All @@ -27,7 +28,7 @@

<joint name="world_joint" type="fixed">
<parent link="world" />
<child link = "base_link" />
<child link="$(arg prefix)base_link" />
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
</joint>

Expand Down
5 changes: 3 additions & 2 deletions ur_description/urdf/ur10_robot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name="ur10" >

<xacro:arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface"/>
<xacro:arg name="prefix" default=""/>

<!-- common stuff -->
<xacro:include filename="$(find ur_description)/urdf/common.gazebo.xacro" />
Expand All @@ -12,7 +13,7 @@

<!-- arm -->
<xacro:arg name="kinematics_config" default="$(find ur_description)/config/ur10_default.yaml"/>
<xacro:ur10_robot prefix="" joint_limited="false"
<xacro:ur10_robot prefix="$(arg prefix)" joint_limited="false"
transmission_hw_interface="$(arg transmission_hw_interface)"
kinematics_file="${load_yaml('$(arg kinematics_config)')}"
/>
Expand All @@ -21,7 +22,7 @@

<joint name="world_joint" type="fixed">
<parent link="world" />
<child link = "base_link" />
<child link="$(arg prefix)base_link" />
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
</joint>

Expand Down
5 changes: 3 additions & 2 deletions ur_description/urdf/ur3_joint_limited_robot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name="ur3" >

<xacro:arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface"/>
<xacro:arg name="prefix" default=""/>

<!-- common stuff -->
<xacro:include filename="$(find ur_description)/urdf/common.gazebo.xacro" />
Expand All @@ -12,7 +13,7 @@

<!-- arm -->
<xacro:arg name="kinematics_config" default="$(find ur_description)/config/ur3_default.yaml"/>
<xacro:ur3_robot prefix="" joint_limited="true"
<xacro:ur3_robot prefix="$(arg prefix)" joint_limited="true"
shoulder_pan_lower_limit="${-pi}" shoulder_pan_upper_limit="${pi}"
shoulder_lift_lower_limit="${-pi}" shoulder_lift_upper_limit="${pi}"
elbow_joint_lower_limit="${-pi}" elbow_joint_upper_limit="${pi}"
Expand All @@ -27,7 +28,7 @@

<joint name="world_joint" type="fixed">
<parent link="world" />
<child link = "base_link" />
<child link="$(arg prefix)base_link" />
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
</joint>

Expand Down
5 changes: 3 additions & 2 deletions ur_description/urdf/ur3_robot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name="ur3" >

<xacro:arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface"/>
<xacro:arg name="prefix" default=""/>

<!-- common stuff -->
<xacro:include filename="$(find ur_description)/urdf/common.gazebo.xacro" />
Expand All @@ -12,7 +13,7 @@

<!-- arm -->
<xacro:arg name="kinematics_config" default="$(find ur_description)/config/ur3_default.yaml"/>
<xacro:ur3_robot prefix="" joint_limited="false"
<xacro:ur3_robot prefix="$(arg prefix)" joint_limited="false"
transmission_hw_interface="$(arg transmission_hw_interface)"
kinematics_file="${load_yaml('$(arg kinematics_config)')}"
/>
Expand All @@ -21,7 +22,7 @@

<joint name="world_joint" type="fixed">
<parent link="world" />
<child link = "base_link" />
<child link="$(arg prefix)base_link" />
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
</joint>

Expand Down
5 changes: 3 additions & 2 deletions ur_description/urdf/ur5_joint_limited_robot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name="ur5" >

<xacro:arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface"/>
<xacro:arg name="prefix" default=""/>

<!-- common stuff -->
<xacro:include filename="$(find ur_description)/urdf/common.gazebo.xacro" />
Expand All @@ -12,7 +13,7 @@

<!-- arm -->
<xacro:arg name="kinematics_config" default="$(find ur_description)/config/ur5_default.yaml"/>
<xacro:ur5_robot prefix="" joint_limited="true"
<xacro:ur5_robot prefix="$(arg prefix)" joint_limited="true"
shoulder_pan_lower_limit="${-pi}" shoulder_pan_upper_limit="${pi}"
shoulder_lift_lower_limit="${-pi}" shoulder_lift_upper_limit="${pi}"
elbow_joint_lower_limit="${-pi}" elbow_joint_upper_limit="${pi}"
Expand All @@ -27,7 +28,7 @@

<joint name="world_joint" type="fixed">
<parent link="world" />
<child link = "base_link" />
<child link="$(arg prefix)base_link" />
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
</joint>

Expand Down
5 changes: 3 additions & 2 deletions ur_description/urdf/ur5_robot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name="ur5" >

<xacro:arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface"/>
<xacro:arg name="prefix" default=""/>

<!-- common stuff -->
<xacro:include filename="$(find ur_description)/urdf/common.gazebo.xacro" />
Expand All @@ -12,7 +13,7 @@

<!-- arm -->
<xacro:arg name="kinematics_config" default="$(find ur_description)/config/ur5_default.yaml"/>
<xacro:ur5_robot prefix="" joint_limited="false"
<xacro:ur5_robot prefix="$(arg prefix)" joint_limited="false"
transmission_hw_interface="$(arg transmission_hw_interface)"
kinematics_file="${load_yaml('$(arg kinematics_config)')}"
/>
Expand All @@ -21,7 +22,7 @@

<joint name="world_joint" type="fixed">
<parent link="world" />
<child link = "base_link" />
<child link="$(arg prefix)base_link" />
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
</joint>

Expand Down
13 changes: 7 additions & 6 deletions ur_e_description/launch/ur10e_upload.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
<arg name="limited" default="false" doc="If true, limits joint range [-PI, PI] on all joints." />
<arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface" />
<arg name="kinematics_config" default="$(find ur_e_description)/config/ur10e_default.yaml"/>
<arg name="prefix" default="" doc="Prefix robot joints"/>

<param unless="$(arg limited)" name="robot_description"
command="$(find xacro)/xacro --inorder '$(find ur_e_description)/urdf/ur10e_robot.urdf.xacro'
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)"
/>
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)
prefix:=$(arg prefix)" />
<param if="$(arg limited)" name="robot_description"
command="$(find xacro)/xacro --inorder '$(find ur_e_description)/urdf/ur10e_joint_limited_robot.urdf.xacro'
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)"
/>
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)
prefix:=$(arg prefix)" />
</launch>
13 changes: 7 additions & 6 deletions ur_e_description/launch/ur3e_upload.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
<arg name="limited" default="false" doc="If true, limits joint range [-PI, PI] on all joints." />
<arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface" />
<arg name="kinematics_config" default="$(find ur_e_description)/config/ur3e_default.yaml"/>
<arg name="prefix" default="" doc="Prefix robot joints"/>

<param unless="$(arg limited)" name="robot_description"
command="$(find xacro)/xacro --inorder '$(find ur_e_description)/urdf/ur3e_robot.urdf.xacro'
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)"
/>
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)
prefix:=$(arg prefix)" />
<param if="$(arg limited)" name="robot_description"
command="$(find xacro)/xacro --inorder '$(find ur_e_description)/urdf/ur3e_joint_limited_robot.urdf.xacro'
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)"
/>
transmission_hw_interface:=$(arg transmission_hw_interface)
kinematics_config:=$(arg kinematics_config)
prefix:=$(arg prefix)" />
</launch>
Loading