User Tools

Site Tools


Writing /var/lib/dokuwiki/data/meta/tutorials/object_manipulation_system.meta failed
Unable to save metadata file. Hint: disk full; file permissions; safe_mode setting.
tutorials:object_manipulation_system

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:object_manipulation_system [2018/12/24 23:25] – [Execute with Whole robot] dgarciatutorials:object_manipulation_system [2022/09/20 00:08] (current) – external edit 127.0.0.1
Line 14: Line 14:
 ===== Installation ===== ===== Installation =====
  
-**OMS** is written in Python 3, and we tried to use only standard libraries. Before installing **OMS** you will have to install the following dependenciesRemember to install the versions for Python 3.+**First** you will need to install the humanoid robot SimulatorSo follow [[tutorials:object_manipulation_robot_simulator| this tutorial]] for installing it.
  
-  numpy scipy matplotlib+When you have installed the Humanoid Robot Simulator, you will need to create a Python virtual environment. **Please note that OMS uses Python3**, do not create a Python2 virtualenv, as it will not work.
  
-First you need to install YARP in your computer. **OMS** is writen in Python 3 so, when you generate the bidings be carefull to select Python 3, not Python 2. Unfortunately YARP only allows one type of binding, so if you generate Python3 bidings, you will loose Python 2 bidings. A fix that I implemented was to install a container (or chroot) with YARP compiled for Python 2 to use with the [[tutorials:object_manipulation_robot_simulator|ARCOS-Lab Humanoid Robot Simulator]], and use the YARP with Python 3 natively on my computer. Here you can find a usefull tutorial for [[tutorials:installing_yarp_in_debian|Installing YARP]].  +<code bash> 
- +  mkdir ~/python 
-It is very important you make sure you have pyrovito installed. Follow [[tutorials:object_manipulation_robot_simulator| this tutorial]] to install the complete humanoid robot simulator (pyrovito included). Remember that simulator uses Python2+  cd python 
- +  virtualenv --python=python3.7 arcos 
-  cd ~/local/src/+  cd arcos 
 +  mkdir src
   git clone ssh://gitolite3@arcoslab.eie.ucr.ac.cr/oms   git clone ssh://gitolite3@arcoslab.eie.ucr.ac.cr/oms
-  git checkout arch-devel+</code>  
 +   
 +Now that you have created the virtual environment we need t activate it. Remember to do this __before__ working with OMS __always__
  
-This is an internal repository, so if you do not have access, ask [[people:dgarcia|Daniel]] to add you+<code bash> 
 +  cd ~/python/arcos 
 +  source bin/activate.sh 
 +</code>
  
-Follow the instructions that you will find in the README file. It will be very easy to installbecause it was developed as a Python Package.+When the virtual environment is activated and you want to exitjust type
  
 +<code bash>
 +  deactivate
 +</code>
  
 +Now follow the ''README'' file located at ''<virtualenv>/arcos/src/oms/README.MD'' for the rest of the installation instructions.
 ===== Contributing ===== ===== Contributing =====
  
Line 43: Line 53:
 ===== Execute with Whole robot ===== ===== Execute with Whole robot =====
  
-It is also possible to execute **OMS** with the robot. Inside the **OMS** repository some instructions are provided to get a basic setup going. Here one can learn how to execute it with the entire robot. It is worth mentioning that **OMS** and the robot simulator are not 100%  compatible (mainly because they use different Python versions) so a //glue// script was developed to have an interface between the two. This //glue// is not part of the official simulator, because when the simulator is ported to Python3/[[http://www.ros.org/|ROS]] it will not be required. Similarly, the //glue// is not part of **OMS** because once it is ported to [[http://www.ros.org/|ROS]], it will not be required. So it was decided to include this glue into [[https://gitlab.com/arcoslab/cmoc/ | CMOC]], the predecessor of **OMS**.+**Warning!** this functionality is currently broken in master, because of some changes that were introduced for allowing interactive model parameters modifications.
  
-First checkout the branch where the script was included: +It is also possible to execute **OMS** with the robot. Inside the **OMS** repository some instructions are provided to get a basic setup going. Here one can learn how to execute it with the entire robot. It is worth mentioning that **OMS** and the robot simulator are not 100%  compatible (mainly because they use different Python versions) so a //glue// script was developed to have an interface between the two. This //glue// is not part of the official simulator, because when the simulator is ported to Python3/[[http://www.ros.org/|ROS]] it will not be required. Similarly, the //glue// is not part of **OMS** because once it is ported to [[http://www.ros.org/|ROS]], it will not be required. So it was decided to include this glue into [[https://gitlab.com/arcoslab/cmoc/ | CMOC]], the predecessor of **OMS**.
- +
-  cd {CMOC_REPO_PATH} +
-  git checkout glue+
      
 Now, start a YARP server. Now, start a YARP server.
Line 56: Line 63:
  
   cd ~/local/src   cd ~/local/src
-  vfclik -i lwr -i right -d robot_descriptions/arcosbot/kinematics/lwr/ -+  vfclik --/arcosbot-real -i lwr -i right -d robot_descriptions/arcosbot/kinematics/lwr/
- +
-In a separate terminal, execute ''vfclick'' for the left arm: +
- +
-  cd ~/local/src +
-  vfclik -i lwr -i left -d robot_descriptions/arcosbot/kinematics/lwr/ -s+
  
 In another terminal execute the hands simulator: In another terminal execute the hands simulator:
  
   cd ~/local/src   cd ~/local/src
-  sahand_yarp_sim --d -n -f robot_descriptions/arcosbot/kinematics/sahand/hands_kin.py+  sahand_yarp_sim -b /arcosbot-real -r -d -n -f robot_descriptions/arcosbot/kinematics/sahand/hands_kin.py -s
      
 Then execute ''pyrovito'' for visualization: Then execute ''pyrovito'' for visualization:
  
   cd ~/local/src   cd ~/local/src
-  pyrovito -r lwr --arm_right --arm_left --hand_right --hand_left -a robot_descriptions/arcosbot/kinematics/lwr/ -d robot_descriptions/arcosbot/kinematics/sahand/+  pyrovito -n /arcosbot-real -r lwr --arm_right --hand_right -a robot_descriptions/arcosbot/kinematics/lwr/ -d robot_descriptions/arcosbot/kinematics/sahand/
      
 Finally execute ''glue'' in a separate terminal. Finally execute ''glue'' in a separate terminal.
  
   cd ~/local/src/cmoc/objects/sliding/scripts   cd ~/local/src/cmoc/objects/sliding/scripts
-  python glue+  python glue.py
      
 +If you want to run with the finger calibration
 +
 +  cd ~/local/src/cmoc/objects/sliding/sctipts
 +  python glue.py -c ~/local/src/robot_descriptions/arcosbot/kinematics/sahand/calibration_data/finger_calibration_data.py -n /arcosbot-real
 +
 If you want to ignore **OMS** commands and move the robot from the keyboard add the ''-g'' option. This will only ignore the commands that come from the robot interface, but it will still send the end effectors state back to **OMS**, so that the robot can still interact with the objects. If you want to ignore **OMS** commands and move the robot from the keyboard add the ''-g'' option. This will only ignore the commands that come from the robot interface, but it will still send the end effectors state back to **OMS**, so that the robot can still interact with the objects.
  
Line 100: Line 107:
 Now a configuration file has to be created so that the ''oms_core'' uses it for the initialization process. One can use other objects by changing the ''scene_path''. The following commands will assume that you downloaded this file, and placed it in ''~/.oms_data/'' Now a configuration file has to be created so that the ''oms_core'' uses it for the initialization process. One can use other objects by changing the ''scene_path''. The following commands will assume that you downloaded this file, and placed it in ''~/.oms_data/''
  
-<code - cylinder_configuration.json>+<code - conf_cylinder.json>
 { {
     "entity_db_path": ".oms_data/default/monolith.json",     "entity_db_path": ".oms_data/default/monolith.json",
Line 111: Line 118:
     "robot_carrier": "tcp",     "robot_carrier": "tcp",
     "vis_carrier": "tcp",     "vis_carrier": "tcp",
 +    "perceived_object": "clorox",
     "frequency": 60     "frequency": 60
  
 </code> </code>
 +
 +If you executed ''glue'' without the ''-g'' option (which ignores **OMS** commands), you should now execute the ''planner'' with the following command:
 +
 +  cd ~/local/src/oms/oms/tests/test_utilities/
 +  python3 test_pseudo_ai.py -i ~/.oms_data/default/test_instructions_cylinder.json
 +  
 +Finally, execute the ''oms_core'' using the previously provided configuration file:
 +
 +  oms_core.py -c .oms_data/conf_cylinder.json
tutorials/object_manipulation_system.1545693908.txt.gz · Last modified: 2022/09/20 00:08 (external edit)