Skip to content
Snippets Groups Projects

Installation

Clone the repo:

	git clone https://git.wur.nl/nxtgen-rmm/fizyr_integration/fizyr_next_pick_location

Or

	git clone https://git.wur.nl/nxtgen-rmm/fizyr_integration/fizyr_next_pick_location.git

Safe setup: Create a conda environment to not mess with your local libraries

conda create -n fizyr_int python=3.9.18
conda activate fizyr_int

###Now run the installation

Option 1: Using setup.py

To install the package using setup.py, run the following command in the project root directory (where setup.py is located):

python setup.py install

Or

pip install .

Option 2: using requirements.txt

pip install -r requirements.txt

Adapt the parameters in ./config/params.yaml

#input
  #Give full path to the model
  ai_model_f: "path_to_model.pkl"

  #Path to the pcd
   pcd_f: "path_to_pointcloud.pcd"

  #Current gripper's radius
  gripper_radius: 0.045  # in meters

  #target dose of product
  target_dose: 45        # in grams

  #Number of trys to find the next best pick location. If none is found, then (nan, nan, nan) is returned. Meaning, time to refill the crate (or try increasing this number
  max_pick_trys: 20

  #At what depth should robot not pick, because the gripper will collide with crate bottom
  allowed_closest_approach_to_crate_bottom: 0.05 #in meters

#output:
  #Path to the next pick location. Once the model computes the next pose (x,y,z) it stores it in this file
  next_pick_location_f: "/path_to_next_pick_location.yaml"

Run the software

Set the environment by either modifying .bashrc or just run it over the terminal where wyou run the code to run the software

export PYTHONPATH="/path/to/fizyr_next_pick_location/:$PYTHONPATH"

Option 1: Run the module:

Then run: python -m next_pick_location.main

Option 2: Run the main script using its absolute path:

python /path/to/project/next_pick_location/main.py

OUTPUT

Output is stored in next_pick_location_f which contains the (x,y,z) location for next pick. When no further valid pick locations are found then the file contains (nan, nan, nan)