Git Product home page Git Product logo

ur5_realsense_calibration's Introduction

UR5 REALSENSE CALIBRATION

Requires

Make sure the following environment:

  • ROS kinetic
  • MoveIt
  • librealsense & realsense-ros

Prepare

  1. Build catkin workspace
mkdir -p ~/catkin_ws/src
cd  ~/catkin_ws
catkin_make
  1. Install dependence packages:
$ sudo apt-get install ros-kinetic-visp
$ sudo apt-get install ros-kinetic-industrial-msgs
$ sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers
  1. Download the calibration lib
$ cd ~/catkin_ws/src
$ git clone https://github.com/portgasray/ur5_realsense_calibarion.git

or

$ git clone https://github.com/portgasray/ur5_realsense_calibarion.git
$ cd  ur5_realsense_calibarion
$ git submodule foreach --recursive git submodule init
$ git submodule foreach --recursive git submodule update
  1. Perform catkin make
$ catkin_make

⭐ Before excuting roslaunch command, you should to preform belowing cmd, Always remember it !

cd ~/catkin_ws
source ./devel/setup.bash

or a convenient way(if you have at least two workspaces, not recommended)

$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc

Excution

  • launch communicaiton with real ur5 robot using IP
$ cd ~/catkin_ws
$ roslaunch ur_modern_driver ur5_bringup.launch limited:=true robot_ip:=169.254.6.80
  • launch moveit
$ cd ~/catkin_ws
$ roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch limited:=true
  • launch point cloud
$ cd ~/catkin_ws
$ roslaunch realsense2_camera rs_rgbd.launch
  • launch calibration program
$ cd ~/catkin_ws
$ roslaunch easy_handeye ur5_realsense_handeyecalibration.launch

After that, you will see three GUI following(make sure your librealsense was installed at single path and the version accord with environment):

  1. Image text

  2. Image text

  3. Image text

In the GUI window 'rqt_easy_handeye.perspective -rqt':

Plugins -> Visualization -> Image View (you may maximize this window to see the options on the left-top)

Image text

select "/aruco_tracker/result" in listbox

Let the broad in the center of your camera screen

Image text

See the Calibrator automatic movement

Begin start, Pleas slow down the speed of your robot

Image text

Click Check starting Pose Button

Take (Next Pose) (Plan) (Excute) (Take Sample) as a loop

** Just remember that, robot move a new pose than Take Sample **

** If board move out of sight, do not press (Take Sample) button, it may occur bug **

** Plz take more than 8 sample, then press (Compute) button to get 7-element-matrix **

Save ! Finish!(The .yaml file will save at ~/.ros/easy_handeye/)

Image text

You can have a look by publishing your calibration result.

  1. Edit launch file and roslaunch it(without close other program window). 1.1 copy parameters in .yaml to ur5_realsense_handeyecalibration_after2.launch(arg:x,y,z,qx,qy,qz,qw)
sudo gedit ~/catkin_ws/src/ur5_realsense_calibarion/easy_handeye/easy_handeye/launch/ur5_realsense_handeyecalibration_after2.launch
sudo gedit ~/.ros/easy_handeye/ur5_realsense_handeyecalibration_eye_on_base.yaml

Image text Image text

1.2 now roslaunch the launch file

(do not run this command)roslaunch  easy_handeye  publish.launch eye_on_hand:=false namespace_prefix:=ur5_realsense_handeyecalibration
(run this)roslaunch easy_handeye ur5_realsense_handeyecalibration_after2.launch 

2.Add TF to see calibration result(in rviz) if you find TF flash in rviz

sudo gedit ~/catkin_ws/src/ur5_realsense_calibarion/easy_handeye/easy_handeye/launch/calibrate.launch

comment out this code patch and re-launch Image text

using easy_handeye publish result

roslaunch easy_handeye publish.launch eye_on_hand:=true

Trouble Shooting

  1. ERROR: 'module 'catkin_pkg' not found', try command below to install the corresponding package.
sudo pip install -U catkin_pkg

In case you experience error with command above, you might want to run it without -U option. see ROSWiki

  1. Revise the content of ur5_realsense_handeyecalibration.launch ur5_realsense_handeyecalibration.launch in easy_handeye/launch changed for calibration, you may need to revise to yourself.

  2. Built target ddynamic_reconfigure $ sudo apt-get install ros-kinetic-ddynamic_reconfigure

  3. ~/calibration_ws/build/ur5_realsense_calibarion/aruco_ros/aruco_ros/setup_custom_pythonpath.sh: 5: exec: ~/calibration_ws/src/ur5_realsense_calibarion/aruco_ros/aruco_ros/cfg/ArucoThreshold.cfg: Permission denied

chmod +x [relevent .cfg]

ur5_realsense_calibration's People

Contributors

ariochen97 avatar imgbotapp avatar portgasray avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ur5_realsense_calibration's Issues

Xarm6 and Realsense

Hi, I am trying to calibration Xarm6 using realsense. What should I change it to do it.

UR10e and realsense

I need to use D435 and Ur10e to do hand eye calibration, what should I change from the UR5 example to UR10e? Thanks

robot arm not moving to target position

I am working on ur5e model. calibration everything done smoothly. tf also published. What is the next step to move robot arm to target poistion. i getting this error for python code: [ INFO] [1692708015.050660691]: Loading robot model 'ur5e_robot'...
[rospack] Error: package 'ur_description' not found
[librospack]: error while executing command
[ERROR] [1692708015.101847539]: Error retrieving file [package://ur_description/meshes/ur5e/collision/base.stl]: Package [ur_description] does not exist
[ WARN] [1692708015.101913826]: Link base_link_inertia has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rospack] Error: package 'ur_description' not found
[librospack]: error while executing command
[ERROR] [1692708015.123158021]: Error retrieving file [package://ur_description/meshes/ur5e/collision/shoulder.stl]: Package [ur_description] does not exist
[ WARN] [1692708015.123208731]: Link shoulder_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rospack] Error: package 'ur_description' not found
[librospack]: error while executing command
[ERROR] [1692708015.146232073]: Error retrieving file [package://ur_description/meshes/ur5e/collision/upperarm.stl]: Package [ur_description] does not exist
[ WARN] [1692708015.146285351]: Link upper_arm_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rospack] Error: package 'ur_description' not found
[librospack]: error while executing command
[ERROR] [1692708015.167086579]: Error retrieving file [package://ur_description/meshes/ur5e/collision/forearm.stl]: Package [ur_description] does not exist
[ WARN] [1692708015.167146771]: Link forearm_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rospack] Error: package 'ur_description' not found
[librospack]: error while executing command
[ERROR] [1692708015.189023219]: Error retrieving file [package://ur_description/meshes/ur5e/collision/wrist1.stl]: Package [ur_description] does not exist
[ WARN] [1692708015.189099533]: Link wrist_1_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rospack] Error: package 'ur_description' not found
[librospack]: error while executing command
[ERROR] [1692708015.212023616]: Error retrieving file [package://ur_description/meshes/ur5e/collision/wrist2.stl]: Package [ur_description] does not exist
[ WARN] [1692708015.212073091]: Link wrist_2_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rospack] Error: package 'ur_description' not found
[librospack]: error while executing command
[ERROR] [1692708015.236744720]: Error retrieving file [package://ur_description/meshes/ur5e/collision/wrist3.stl]: Package [ur_description] does not exist
[ WARN] [1692708015.236805908]: Link wrist_3_link has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[ WARN] [1692708015.236913265]: No geometry is associated to any robot links
[ WARN] [1692708015.253013040]: IK plugin for group 'manipulator' relies on deprecated API. Please implement initialize(RobotModel, ...).
[ INFO] [1692708015.256823390]: IK Using joint shoulder_link -6.28319 6.28319
[ INFO] [1692708015.256860081]: IK Using joint upper_arm_link -6.28319 6.28319
[ INFO] [1692708015.256887159]: IK Using joint forearm_link -3.14159 3.14159
[ INFO] [1692708015.256911933]: IK Using joint wrist_1_link -6.28319 6.28319
[ INFO] [1692708015.256930768]: IK Using joint wrist_2_link -6.28319 6.28319
[ INFO] [1692708015.256954094]: IK Using joint wrist_3_link -6.28319 6.28319
[ INFO] [1692708015.256982159]: Looking in common namespaces for param name: manipulator/position_only_ik
[ INFO] [1692708015.258219543]: Looking in common namespaces for param name: manipulator/solve_type
[ INFO] [1692708015.259798958]: Using solve type Distance
[ WARN] [1692708015.485792970]: TF_OLD_DATA ignoring data from the past (Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained) for frame camera_color_optical_frame at time 1692707948.158540 according to authority unknown_publisher
[ INFO] [1692708016.327674486]: Ready to take commands for planning group manipulator.
Traceback (most recent call last):
File "test2.py", line 56, in
move_to_target_position()
File "test2.py", line 43, in move_to_target_position
group.set_workspace("/home/toor/catkin_ws/src/universal_robot/ur_description/meshes/ur5e/collision")
File "/opt/ros/noetic/lib/python3/dist-packages/moveit_commander/move_group.py", line 561, in set_workspace
raise MoveItCommanderException(
moveit_commander.exception.MoveItCommanderException: Expected 0, 4 or 6 values in list specifying workspace"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.