Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .docker_utils/Dockerfile.f1tenth_arm
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ RUN source source_ros2.sh && \
RUN source source_ros2.sh && \
make livox-driver

########## Build fusion-engine-driver, ntrip_client, and p1_tools for PointOneNav GPS #########
RUN source source_ros2.sh && \
make pointonenav

########### ADD CUSTOM FUNCTIONS ###########
WORKDIR /home/scripts/
COPY scripts/bashrc.sh ./bashrc.sh
Expand All @@ -432,4 +436,4 @@ RUN ["/bin/bash", "-c", "echo '. /home/scripts/bashrc.sh' >> /root/.bashrc"]
WORKDIR $WORKSPACE
RUN echo export WORKSPACE=$WORKSPACE >> /root/.bashrc
# RUN echo 'export LD_PRELOAD=/usr/local/lib/python3.8/dist-packages/sklearn/__check_build/../../scikit_learn.libs/libgomp-d22c30c5.so.1.0.0' >> ~/.bashrc
ENTRYPOINT ["/bin/bash"]
ENTRYPOINT ["/bin/bash"]
4 changes: 4 additions & 0 deletions .docker_utils/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
I added at the very bottom right after the LIVOX scripts, the scripts necessary for PointOneNav

On one terminal, ros2 launch ntrip_client ntrip_client_launch.py host:=polaris.pointonenav.com port:=2101 mountpoint:=POLARIS ntrip_version:=v2 authenticate:=true username:=gbUv1nO2 password:=zZLxzLpJ
On another terminal, ros2 run fusion-engine-driver fusion_engine_ros_driver --ros-args -p connection_type:=tty -p tty_port:=/dev/ttyUSB1
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.ONESHELL:
SHELL := /bin/bash
.DEFAULT_GOAL := build

.PHONY: build
build:
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
Expand Down Expand Up @@ -37,6 +36,11 @@ livox-driver:
vcs import < repos/livox.repos
./scripts/livox_driver.sh

.PHONY: pointonenav
pointonenav:
vcs import < repos/pon.repos
./scripts/pon.sh

.PHONY: racer
racer:
vcs import < repos/common.repos
Expand Down
5 changes: 5 additions & 0 deletions repos/common.repos
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ repositories:
type: git
url: https://github.com/Triton-AI/multi_cam_oak_lite.git
version: master
#GPS
src/external/sensors/gps:
type: git
url:
version: master
14 changes: 14 additions & 0 deletions repos/pon.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repositories:
src/external/sensors/gps/pointonenav:
type: git
url: https://github.com/Triton-AI/ros2-fusion-engine-driver.git
version: main
src/external/sensors/gps/pointonenav/ntrip_client:
type: git
url: https://github.com/LORD-MicroStrain/ntrip_client
version: ros2
src/external/sensors/gps/pointonenav/quectel:
type: git
url: https://github.com/UCSD-ECEMAE-148/quectel.git
version: main

2 changes: 1 addition & 1 deletion repos/sim.repos
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ repositories:
src/external/f1tenth_sim/f1tenth_gym_ros:
type: git
url: https://github.com/Triton-AI/f1tenth_gym_ros.git
version: main
version: main
100 changes: 100 additions & 0 deletions scripts/pon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/bin/bash

# All documentations related are as follows
# https://github.com/PointOneNav/p1-host-tools
# https://github.com/PointOneNav/ros2-fusion-engine-driver/tree/main?tab=readme-ov-file#requirements
# Property of Triton AI @ UCSD, Kevin Shin

# Check for C++11 or later
if g++ -std=c++11 -E -x c++ - </dev/null &> /dev/null; then
echo "C++11 or later: Installed"
else
echo "C++11 or later: Not installed"
fi

# Check for CMake 3.x
if command -v cmake >/dev/null 2>&1; then
cmake_version=$(cmake --version | head -n1 | awk '{print $3}')
if [[ $cmake_version == 3.* ]]; then
echo "CMake 3.x: Installed (version $cmake_version)"
else
echo "CMake 3.x: Not installed (found version $cmake_version)"
fi
else
echo "CMake 3.x: Not installed"
fi

# Check for GCC or Clang
if command -v gcc >/dev/null 2>&1; then
echo "GCC: Installed ($(gcc --version | head -n1))"
elif command -v clang >/dev/null 2>&1; then
echo "Clang: Installed ($(clang --version | head -n1))"
else
echo "Neither GCC nor Clang is installed"
fi

# Check for ROS 2 Foxy
if [ -f /opt/ros/foxy/setup.bash ]; then
echo "ROS 2 Foxy: Installed"
else
echo "ROS 2 Foxy: Not installed"
fi


# Install missing packages
install_package() {
echo "Installing $1..."
sudo apt-get update
sudo apt-get install -y $1
}

check_package() {
if dpkg -s $1 >/dev/null 2>&1; then
return 0
else
return 1
fi
}

packages=("ros-foxy-gps-msgs" "ros-foxy-nmea-msgs" "ros-foxy-mavros-msgs" "ros-foxy-rtcm-msgs")
all_installed=true

for package in "${packages[@]}"; do
if ! dpkg -s $package >/dev/null 2>&1; then
install_package $package
else
echo "$package is already installed."
fi

if ! check_package $package; then
all_installed=false
fi
done

POINTONENAV=/home/jetson/projects/robocar/src/external/sensors/gps/pointonenav
# Configurations
if $all_installed; then
echo "All required ROS2 Foxy packages are installed. Proceeding with FusionEngine and NTRIPClient installation."
cd $POINTONENAV/p1-host-tools/
python3 -m venv p1_tools_venv
source p1_tools_venv/bin/activate
pip3 install -r requirements.txt
bin/config_tool.py apply uart2_message_rate fe ROSPoseMessage 100ms
bin/config_tool.py apply uart2_message_rate fe ROSGPSFixMessage 100ms
bin/config_tool.py apply uart2_message_rate fe ROSIMUMessage 100ms
bin/config_tool.py save
deactivate

cd $POINTONENAV/fusion-engine-driver/
rosdep install -i --from-path ./ --rosdistro foxy -y
colcon build --packages-select fusion-engine-driver
source install/local_setup.bash

cd $POINTONENAV/ntrip_client/
colcon build --packages-select ntrip_client
source install/local_setup.bash

echo "FusionEngine and NTRIPClient configured and available as ROS2 packages."
else
echo "Some required ROS2 Foxy packages are missing. Please install them before proceeding"
fi
Loading