Skip to content

Latest commit

 

History

History

ros

Example ROS package that uses genmos_object_search

Note that genmos_object_search is written in Python 3. For ROS, it is best integrated with ROS Noetic.

Setup

Create symbolic link

Go to the `src` folder of your ROS workspace. Then run:

ln -s path/to/genmos_object_search/ros genmos_object_search_ros

This effectively adds a ROS package called “genmos_object_search_ros” into your workspace

Install Dependencies

This is a ROS package; Therefore, it is expected to operate within a ROS workspace.

Before building this package, make sure you have activated a virtualenv. Then, run

source install_dependencies.bash

to install python dependencies.

Note that we use ros_numpy to convert point cloud ROS message to numpy array, so that point cloud observation can be used to update the search region (see code). Typically, one installs ros_numpy by sudo apt-get install ros-noetic-ros-numpy. However, there are two issues (1) this issue where numpy > 1.24 causes an AttributeError on `numpy.float`, and that (2) the ros_numpy package was no longer maintained.

As a result, we folded the source code of ros_numpy into our repository, under ./thirdparty/ros_numpy. It is modified to be a standard Python package that can be pip-installed. The installation is, still, handled by source install_dependencies.bash so you do not need to do anything.

Build the ROS package

catkin_make -DCATKIN_WHITELIST_PACKAGES="genmos_object_search_ros"

Note that if you are using the [robotdev Spot environment](https://github.com/zkytony/robotdev/tree/master/spot), you need to run the following command instead

build_spot -DCATKIN_WHITELIST_PACKAGES="genmos_object_search_ros"

Download Dataset and Models (Optional)

Install gdown, then run download script:

pip install gdown
python download.py

This will download both the SL\_OSM\_Dataset and the frame of reference prediction models. The SL\_OSM\_Dataset will be saved under data, while the models will be saved under models.

Also, you will need to download spacy models. We use en_core_web_lg (400MB). To download it:

python -m spacy download en_core_web_lg