Universal Robot (UR3) Pick and Place Hardware Implementation with ROS using a USB Cam and an Electromagnetic Gripper
Simulation video
Hardware video
- How to cite this repository:
or BibTex
Huang, L., Zhao, H., Universal Robot (UR3) Pick and Place Hardware Implementation with ROS using a USB Cam and an Electromagnetic Gripper, (2018), GitHub repository, https://github.com/lihuang3/ur3_ROS-hardware
@misc{Huang2018, author = {Huang, L., Zhao, H.}, title = {Universal Robot (UR3) Pick and Place Hardware Implementation with ROS using a USB Cam and an Electromagnetic Gripper}, year = {2018}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/lihuang3/ur3_ROS-hardware}} }
Follow the steps on the official website "Getting Started with a Universal Robot and ROS-Industrial"
to set up network using a router.
Download the repo ur_modern_driver
to src
in your Universal Robot workspace, and catkin_make
. If there is hardware interface error during catkin make, replace ur_hardware_interface.cpp
in ur_modern_driver
To connect your PC and an UR3, run the following launch file, (you need to source devel/setup.bash
first, and go to each folder that includes the launch file to launch it)
roslaunch ur_modern_driver ur3_bringup.launch robot_ip:=ROBOT_IP_ADDRESS
roslaunch ur3_moveit_config ur3_moveit_planning_execution.launch
roslaunch ur3_moveit_config moveit_rviz.launch config:=true
You may need to change your joint limit file before you run any motion planning program on the hardware. (Example
)
official tutorial
Generating Message Header File
After you download rosserial, to generate custom messages you should follow the following step:
cd <your workspace>
source devel/setup.bash
rosrun rosserial_arduino make_libraries.py /home/<username>/arduino-1.8.5/libraries
you can check you custom message folder at /home//arduino-1.8.5/libraries/ros_lib/ur5_notebook (or ur3_hardware)
To use arduino subscribe ROS topic:
Template for a ROS Subscriber Using rosserial on Arduino
- compile /ur3_hardware/arduino_gripper/arduino_gripper.ino in Arduino IDE, and uplaod to board
- Open a new Terminal and run initialize.roslaunch
- Open another Terminal and start the subscriber node by typing the following command:
cd <your workspace>
source devel/setup.bash
rosrun rosserial_python serial_node.py /dev/ttyACM1
- In Arduino IDE open serial monitor