Created
March 17, 2020 23:22
-
-
Save burakaksoy/843d09d0c1201250568e111867403213 to your computer and use it in GitHub Desktop.
Sawyer-Simulation-with-RobotRaconteur-v0.9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SAWYER SIMULATOR SETUP | |
| Date: Tue 17 Mar 2020 05:20:31 PM EDT | |
| Author: Burak Aksoy | |
| STEPS FOR A FRESHLY INSTALLED UBUNTU 18.04 | |
| ------ | |
| NOTE: | |
| -A question: Can I use Ubuntu Xenial(16.04) and ROS kinetic instead of Bionic and Melodic? | |
| -Answer: The teach pendant will be targeting a minimum Python version of 3.6. Version 3.6 added some important features like type hints. Unfortunately Ubuntu Xenial uses Python 3.5, so we will need to use a minimum of Ubuntu Bionic. | |
| ------ | |
| -------------------------------------------- | |
| A. INSTALL ROBOT RACONTEUR (RR) | |
| 1- Follow steps under title Ubuntu Xenial and Bionic at the GitHub page of RR: | |
| https://github.com/robotraconteur/robotraconteur/wiki/Download | |
| In summary of installation of RR for C++ and Python: | |
| $ sudo add-apt-repository ppa:robotraconteur/ppa | |
| $ sudo apt-get update | |
| $ sudo apt-get install robotraconteur-dev | |
| $ sudo apt-get install python-robotraconteur | |
| $ sudo apt-get install python3-robotraconteur | |
| -------------------------------------------- | |
| B. INSTALL ROS MELODIC | |
| 1- Follow the steps at ROS web page: | |
| http://wiki.ros.org/melodic/Installation/Ubuntu | |
| 2- Additionally install effort controllers with command: | |
| $ sudo apt-get install ros-melodic-effort-controllers | |
| -------------------------------------------- | |
| C. INSTALL .NET Core 3.1 | |
| 1- Follow the steps at: | |
| https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1804 | |
| -------------------------------------------- | |
| D. INSTALL AND START THE SAWYER SIMULATOR | |
| 1- The summary of the commands are below: | |
| $ mkdir -p ~/ros_ws/src | |
| $ cd ~/ros_ws/src | |
| $ git clone https://github.com/RethinkRobotics-opensource/sns_ik.git | |
| $ git clone https://github.com/RethinkRobotics/sawyer_simulator.git | |
| $ cd ~/ros_ws/src | |
| $ wstool init . | |
| $ wstool merge sawyer_simulator/sawyer_simulator.rosinstall | |
| $ wstool update | |
| $ source /opt/ros/melodic/setup.bash | |
| $ cd ~/ros_ws | |
| $ catkin_make | |
| ------- | |
| Note: Source for the commands above can be found under title Sawyer Simulator Installation at: | |
| https://sdk.rethinkrobotics.com/intera/Gazebo_Tutorial | |
| It says it is for Kinetic, but it has worked fine on Melodic | |
| Also, the Github page: | |
| https://github.com/RethinkRobotics/sawyer_simulator | |
| ------- | |
| 2- Run the gazebo simulation: | |
| $ roslaunch sawyer_gazebo sawyer_world.launch | |
| Note: No need to execute $./intera.sh sim before this command as suggested in the website above since everything is in localhost. | |
| ------ | |
| NOTE: If you see a REST error at roslaunch (source: https://www.youtube.com/watch?v=ftDz_EVoatw) | |
| $ cd ~/.ignition/fuel | |
| $ gedit config.yaml | |
| - Edit lines: | |
| # url: https://api.ignitionfuel.org | |
| url: https://api.ignitionrobotics.org | |
| and save. | |
| ------ | |
| Note: You can check the status of the robot in Gazebo simulation with ROS command $ rostopic echo /robot/state. | |
| ---------------------------------------------------------------------------------- | |
| E. SET UP AND RUN SAWYER SIMULATION WITH RR DRIVER | |
| Note: Before applying steps below, it is suggested to run the gazebo simulation first. | |
| 1- Dowload Sawyer_bin_local and ros_csharp_interop folders into your eg. ~/Desktop. | |
| (ASK* Are these explanations below correct?) | |
| - Sawyer_bin_local folder is just for RR drivers implemented in C#. | |
| (Honglu shared the compiled version with some example python clients at: https://drive.google.com/open?id=199ZZrz64U1TeDs6prCTF4t8-HZsIKMez) | |
| (ASK* Honglu Says this is just a compiled version of https://github.com/johnwason/SawyerRobotRaconteurDriver) | |
| - Ros_csharp_interop-master allows to read std ROS msgs using RR. (https://github.com/johnwason/ros_csharp_interop) | |
| 2- Make ros_csharp_ws directory at your home folder: | |
| $ mkdir ros_csharp_ws | |
| $ cd ros_csharp_ws/ | |
| $ mkdir src | |
| 3- Copy ros_csharp_interop folder into src: | |
| $ cp -r ~/Desktop/ros_csharp_interop ./src/ | |
| 4- Built the packages: | |
| $ cd ros_csharp_ws/ | |
| $ catkin_make_isolated | |
| ------- | |
| NOTE: | |
| - If you see a SWIG error while catkin_make (go to: http://swig.org/svn.html or https://github.com/swig/swig): | |
| go to home directory | |
| $ cd ~/ | |
| $ git clone https://github.com/swig/swig.git | |
| $ ./autogen.sh | |
| $ ./configure | |
| $ make | |
| -- If another error happens | |
| $ sudo apt-get install byacc -y | |
| $ make | |
| $ sudo make install | |
| - Check the installation of SWIG: | |
| $ swig -version | |
| OUTPUT should be smth like: | |
| "SWIG Version 4.0.2 | |
| Compiled with g++ [x86_64-pc-linux-gnu] | |
| Configured options: +pcre | |
| Please see http://www.swig.org for reporting bugs and further information" | |
| - Again: | |
| $ cd ~/ros_csharp_ws/ | |
| $ catkin_make_isolated | |
| ------- | |
| 5- Dont forget to source: | |
| $ source ~/ros_csharp_ws/devel_isolated/setup.bash | |
| 6- Change your directory to Sawyer_bin_local that you downloaded | |
| $ cd ~/Desktop/Sawyer_bin_local/ | |
| 7- Initialize the Sawyer service (The service definition can be checked from: https://github.com/johnwason/robotraconteur_standard_robdef/blob/master/group1/com.robotraconteur.robotics.robot.robdef ) | |
| $ dotnet SawyerRobotRaconteurDriver.dll --robot-info-file=sawyer_robot_default_config.yml | |
| ----- | |
| NOTE: STEPS 5-7 can be combined in a file eg. "commands" and can be executed with | |
| $ ./commands | |
| for time saving because each time we need to use Sawyer RR service we need to execute these commands. | |
| ----- | |
| 8- Test the simulation: | |
| $ cd ~/Desktop/Sawyer_bin_local/ | |
| 9- Run test clients and see the effects on Gazebo: | |
| $ python test_sawyer_driver.py | |
| $ python3 test_sawyer_driver2.py | |
| $ python3 test_sawyer_driver3.py | |
| (ASK* is this correct?) Note: When you test you see some numbers. Those numbers are the summation of the RobotStateFlags defined in https://github.com/johnwason/robotraconteur_standard_robdef/blob/master/group1/com.robotraconteur.robotics.robot.robdef | |
| ----- | |
| Note: There is also a way to install the Sawyer simulator on Windows. It | |
| somewhat works, but isn't all that reliable. | |
| http://wiki.ros.org/Installation/Windows as stated by John Wason. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment