open sequence: launch gazebo files :
roslaunch ur5_notebook initialize.launch
cd python node folder:
python testvisionplanner.py
Simulation video
Hardware video
GitHub: utecrobotics/ur5
testing ur5 motionVery useful ROS blog
ROS探索ROS下如何使用moveit驱动UR5机械臂
ROS UR industrial
ROS modern driver
ur_hardware_interface.cpp
Replace this cpp if there is hardware interface error during catkin make
Official installation tutorial
The following command lines are for ur5 installation in ros-kinetic
mkdir -p ur5_ws/src
cd ur5_ws/src
# retrieve the sources
git clone -b kinetic-devel https://github.com/ros-industrial/universal_robot.git
cd ~/ur5_ws
# checking dependencies
rosdep install --from-paths src --ignore-src --rosdistro kinetic
# buildin,
catkin_make
# if there is any error, try
# pip uninstall em
# pip install empy
# source this workspace (careful when also sourcing others)
cd ~/ur5_ws
source devel/setup.bash
To run UR5 in Gazebo and rviz (source devel/setup.bash
)
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
To test UR5 motion, run testmotion.py
Look into this link for straight line motion
sudo apt-get install ros-kinetic-moveit
launch teh Moveit Setup Assistant
roslaunch moveit_setup_assistant setup_assistant.launch
1. Click on the "Create New MoveIt Configuration Package" button,click the "Browse" button, select the xacro file you created in the Previous Chapter, and click on the "Load Files" button.
PATH: /src/universal_robot/ur_description/urdf/ur5.urdf.xacro
2. Go to the "Self-Collisions" tab, and click on the "Regenerate Collision Matrix" button.
3. move to the "Virtual Joints" tab. Here, you will define a virtual joint for the base of the robot. Click the "Add Virtual Joint" button, and set the name of this joint to FixedBase, and the parent to world.
4. open the "Planning Groups" tab and click the "Add Group" button. Now, you will create a new group called manipulator, which uses the KDLKinematicsPlugin.
3. Move Group Python InterFace Tutorial[`Official tutorial`](http://docs.ros.org/indigo/api/moveit_tutorials/html/doc/pr2_tutorials/planning/scripts/doc/move_group_python_interface_tutorial.html)
Using the ur5 with the MoveIt Motion Planning Framework for quick motion planning. Install the package from package management, and run the MoveIt! planning demo:
$ sudo apt-get install ros-kinetic-ur5-moveit-config
$ roslaunch ur5_moveit_config demo.launch
Our goal is to move the universal robot (ur5) end effector moving in straight line (Cartesian path) with Moveit-Python interface.
References
[1] CMobley7 commented on ros-planning/moveit_commander
[2] homesick-nick UR5CubicInterpolation
[3] Move Group Python Interface Tutorial
[4] ur_modern_driver
To list all video devices picked up by the kernel
$ ls -ltrh /dev/video*
$ cd ur5_ws/src
$ git clone https://github.com/bosch-ros-pkg/usb_cam.git
$ cd ..
$ catkin_make
$ source devel/setup.bash
$ roscd usb_cam
# run `roscore` in a new terminal
# Make sure a usb cam is connected
To connect external cam. Locate the usb_cam-test.launch file in folder
cd ~/ur5_ws/src/usb_cam/launch
Change
<param name="video_device" value="/dev/video0" />
to
<param name="video_device" value="/dev/video1" />
From
cd ~/catkin-ws/src/usb_cam/launch
run
roslaunch usb_cam-test.launch
If this works, quit the test program, open rviz
rosrun rviz rviz
run the following command in ur5_ws folder (source devel/setup.bash
)
rosrun usb_cam usb_cam_node
"RRBot
, or ''Revolute-Revolute Manipulator Robot'',
is a simple 3-linkage, 2-joint arm that we will use to demonstrate various
features of Gazebo and URDFs.
It essentially a double inverted pendulum and demonstrates some fun
control concepts within a simulator."
To get RRBot, clone the gazebo_ros_demos Github repo into the /src
folder of your catkin workspace and rebuild your workspace:
cd ~/catkin_ws/src/
git clone https://github.com/ros-simulation/gazebo_ros_demos.git
cd ..
catkin_make
source devel/setup.bash
Quick start
Rviz:
roslaunch rrbot_description rrbot_rviz.launch
Gazebo:
roslaunch rrbot_gazebo rrbot_world.launch
roslaunch rrbot_control rrbot_control.launch
Example of Moving Joints:
rostopic pub /rrbot/joint2_position_controller/command std_msgs/Float64 "data: -0.9"
-
Tutorial: Using a URDF in Gazebo
prerequisite for Gazebo plugins -
Tutorial: Using Gazebo plugins with ROS
learning to use Gazebo plugins -
ur_description wiki
To view and manipulate the arm models in rviz, install the package from package management and launch the following:
roslaunch ur_description ur5_upload.launch
roslaunch ur_description test.launch
You probably need to install urdf_tutorial:
cd ~/catkin_ws/src/
git clone https://github.com/ros/urdf_tutorial
cd ..
catkin_make
source devel/setup.bash
In rviz, the first task is to choose the frame of reference for the visualization. In left panel, Global Options/Fixed Frame
,
choose a proper frame (e. g. world
)
Next, we want to view the 3D model of the robot. To accomplish this, we will insert an instance of the robot model
plugin
To add the robot model to the rviz scene, click the “Add” button and choose RobotModel
To test UR5 USB cam, run testvision.py
launch gazebo files :
roslaunch ur5_notebook initialize.launch
change object pose and twist with command line:
rosservice call /gazebo/set_model_state '{model_state: { model_name: red_box, pose: { position: { x: 0, y: 0 ,z: 1 }, orientation: {x: 0, y: 0, z: 0, w: 0 } }, twist: { linear: {x: 0.1 , y: 0 ,z: 0 } , angular: { x: 0.0 , y: 0 , z: 0.0 } } , reference_frame: world } }'