Navigator Library Installation Error

Hello,

I am trying to install the Navigator Library for the Navigator Flight Controller in order to access data sampled from the ADC ports on the flight controller, specifically Hall Effect sensors. I need to install the library within the ROS Docker extension that BlueOS provides so that I can generate a topic that my control system can access. I had some initial success with setting this up, but recently I encountered an error when running the library.

This error looks like it has to do with some of the dependencies that are installed alongside the navigator library to get it working correctly, but I am unsure of how to fix the error to get it working so any help would be appreciated.

If it helps to explain it better I have gotten the library correctly installed and working on the raspberry pi BlueOS outside of the docker container, but I get issues with installation when I try to install the library inside the ROS docker container.

Hi @rstar0509,

This docker is based over the official ros onetic image, that by default comes with python 3.8.
The navigator library right now should support python 3.7 or newer versions, but currently we are only releasing binaries for python 3.9 and newer.

That’s one of the problems that you’ll face when dealing with ROS.
I would highly recommend to do your entire work under a python virtual environment or another ROS docker, where you should have more control over it.
With that said, you can install navigator library on the ROS extension using python virtual environment.

# install everything necessary for the following steps
sudo apt install -y python3.8-full python3-pip curl git
# Install pipenv for virtual environment control
python3 -m pip install pipenv --user
# Install pyenv to manage multiple python versions
curl https://pyenv.run | bash
# Finish pyenv configuration
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
source ~/.bashrc 
# Create a project folder
mkdir navigator_project && cd navigator_project
# Install Python 3.11
python3 -m pipenv --python 3.11
# Install navigator library
python3 -m pipenv install bluerobotics-navigator
# Run our [example](https://github.com/bluerobotics/navigator-lib/blob/master/examples/python/main.py)
python3 -m pipenv run python main.py

Hello,

Thank you for the assistance. I have since fixed the issue and it’s as you said using Python 3.9 or newer. I ended up installing python3.9 and updating the ros node to specifically use that version when running, and I was able to call the library properly.

1 Like