Hello @pedro-fuoco and @rfriedman I’ve read your project research and it is great! I usually use ROS for my research work and I’m approaching to ROS. I work with ground rovers, do you think your project can also be adapted to work on UGV? I’m looking for a navigation system with NO GPS support, but with a high accuracy.
rfriedman
(rfriedman)
November 26, 2023, 2:00am
22
Yep! We’ve already made basic examples for rover here. Feel free to try it out and provide feedback.
You can do velocity control with rover
on master
.
Pretty much all the code in ArduPilot for the ROS 2 interface is platform-agnostic anyways. The platform-specific adaptations are very thin.
If you don’t ever have GPS, there are mods you’ll need to do through parameters to disable GPS during pre-arm.
1 Like
Thank you a lot! I can’t use GPS indoor since the signal would be too noisy, so I need to assume I have no GPS sensor.
Sometimes, it can happen that the vehicle will move from outdoor to indoor so in this case I think the navigation wouldn’t be affected too much.
The problem is when the vehicle will start moving directly from an indoor environment since it does not have amy valid GPS position.
rfriedman
(rfriedman)
November 27, 2023, 11:30pm
24
Yep, that’s totally fine. You have to provide some sort of yaw alignment. We just made the project easier by adding a GPS to pass pre-arm.
Jai.GAY
(Jai GAY)
December 20, 2023, 2:29am
25
@pedro-fuoco , do you manage to pass all the Ardupilot DDS tests ?
colcon test --packages-select ardupilot_dds_tests
colcon test-result --all --verbose
P_L100
(Paul D.)
January 8, 2024, 7:45am
26
Does this work well outdoors in open terrain? Does it lose accuracy over a long flight and if so, how much? What are its limitations in terms of types of terrain, altitude, etc.? Thank you.
1 Like
rfriedman
(rfriedman)
January 14, 2024, 8:07pm
27
The 2D lidar used in SITL is not suitable for outdoor use and it is small range. It will not work in a flat field with no obstacles. There is not much point to use this technology if you are outdoor - just use GPS.
Outdoor requires a different set of technologies and hardware. To my knowledge, there is not much available in ROS 2 for outdoor GPS denied navigation. Some manufacturers sell integrated solutions with their platforms; I would purchase one of those.
The infrastructure (DDS) build here creates a nice platform to develop against in ROS 2, so if you are have ability to perform work in this open-source for outdoor navigation, please share your findings and code.
2 Likes
Jimi1811
(Jim Fabián)
February 15, 2024, 6:15pm
28
Hello @pedro-fuoco , your contributions to the community are truly impressive. I am currently working on a project involving Ardupilot and ROS2 for warehouse applications. The navigation requirements include operating in a 3D environment, as the drone’s goal is to conduct stock counting. Given my relative newness to this field, I would greatly appreciate any recommendations you might have. Thank you!
rfriedman
(rfriedman)
October 29, 2024, 12:37pm
29
Hello Jimi,
This GSOC project was only scoped to 2D. In my recent presentation to ArduPilot, I showed a demo of integration with Bonxai.
I’m still working with the contributor to retrieve their code and create a nice demo/tutorial. If you are interested in 3D navigation and mapping for ArduPilot, please open a new thread so we can discuss there.
1 Like
yonie
(Jonas Niesner)
November 15, 2024, 9:23pm
30
@rfriedman I would also be interested in 3D navigation. Was a new thread about opened this?
rfriedman
(rfriedman)
November 25, 2024, 2:57pm
31
Not yet. Feel free to create one
@david_sastre @rfriedman GitHub - ArduPilot/ardupilot_gz: Tools for ArduPilot ROS2 integration and testing on ROS 2 humble
followed all the steps but getting this error when i set the parameters to use Lidar for navigation
getting Prearm: visodom: not healthy error
[ruby $(which gz) sim-1] [Wrn] [ArduPilotPlugin.cc:1583] ArduPilot controller has reset
[mavproxy.py -5] AP: PreArm: Need Position Estimate
[mavproxy.py -5] AP: PreArm: VisOdom: not healthy
[mavproxy.py -5] AP: PreArm: Need Position Estimate
[mavproxy.py -5] AP: PreArm: VisOdom: not healthy
A same issue is discussed in this issue in the repo too
opened 10:04AM - 21 Jan 24 UTC
I have setup the simulation exactly as specified in the repository. (dependencie… s, param settings etc)
mavproxy shows the message VisOdom: not Healhy
to reproduce the issue I have prepared a Dockerfile (will need Nvidia container toolkit for GPU rendering):
```
FROM ardupilot/ardupilot-dev-ros:latest
RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
RUN apt-get update
RUN apt-get install -y socat terminator gz-garden libsdformat12-dev rapidjson-dev libgflags-dev ros-humble-ament-cmake-mypy ros-humble-image-transport ros-humble-image-transport-plugins ros-humble-geographic-msgs
ENV GZ_VERSION=garden
ENV ROS_DISTRO=humble
RUN pip3 install mavproxy
VOLUME ["/ros2_ws"]
RUN mkdir -p /ros2_ws/src
WORKDIR /ros2_ws/src
# have tried with and without micro-ros
RUN git clone -b $ROS_DISTRO https://github.com/micro-ROS/micro_ros_setup.git micro_ros_setup
RUN wget https://raw.githubusercontent.com/ArduPilot/ardupilot_gz/main/ros2_gz.repos
RUN git clone https://github.com/ArduPilot/ardupilot_ros
RUN vcs import < ros2_gz.repos
WORKDIR /ros2_ws/src/ardupilot
RUN git submodule update --init --recursive
WORKDIR /ros2_ws
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.sh && \
apt-get update && \
rosdep update && \
rosdep install --rosdistro $ROS_DISTRO --from-paths src -i -r -y"
RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.sh && colcon build"
# For GPU support for gazebo
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
# append source to bashrc
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash;source /ros2_ws/install/setup.bash;" >> ~/.bashrc
```
bash script to build image:
```
#!/bin/bash
sudo docker build --no-cache -t $USER/test_sim .
```
bash script to launch simulation using Nvidia graphics card:
```
xhost +local:*
sudo docker run -it --rm -e DISPLAY=$DISPLAY \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--env="XAUTHORITY=$XAUTH" \
--volume="$XAUTH:$XAUTH" \
--runtime=nvidia \
--gpus all \
--privileged \
--net=host \
$USER/test_sim /bin/bash -c "terminator & terminator -e 'source /opt/ros/humble/setup.bash && source /ros2_ws/install/setup.bash && ros2 launch ardupilot_gz_bringup iris_maze.launch.py rviz:=false;/bin/bash ' & \
terminator -e 'source /opt/ros/humble/setup.bash && source /ros2_ws/install/setup.bash && ros2 launch ardupilot_ros cartographer.launch.py;/bin/bash' "
```
otherwise:
```
xhost +local:*
sudo docker run -it --rm -e DISPLAY=$DISPLAY \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--env="XAUTHORITY=$XAUTH" \
--volume="$XAUTH:$XAUTH" \
--privileged \
--net=host \
$USER/test_sim /bin/bash -c "terminator & terminator -e 'source /opt/ros/humble/setup.bash && source /ros2_ws/install/setup.bash && ros2 launch ardupilot_gz_bringup iris_maze.launch.py rviz:=false;/bin/bash ' & \
terminator -e 'source /opt/ros/humble/setup.bash && source /ros2_ws/install/setup.bash && ros2 launch ardupilot_ros cartographer.launch.py;/bin/bash' "
```
start mavproxy
```
mavproxy.py --console --map --aircraft test --master=:14550
```
Then parameters are set using mavproxy using the commands
```
param set AHRS_EKF_TYPE 3
param set EK2_ENABLE 0
param set EK3_ENABLE 1
param set EK3_SRC1_POSXY 6
param set EK3_SRC1_POSZ 1
param set EK3_SRC1_VELXY 6
param set EK3_SRC1_VELZ 6
param set EK3_SRC1_YAW 6
param set VISO_TYPE 1
param set ARMING_CHECK 388598
```
Then, SITL simulation is restarted.
Would really appreciate if someone could help with this, thanks.
rfriedman
(rfriedman)
March 2, 2025, 8:23pm
33
Please subscribe to this issue.
opened 10:04AM - 21 Jan 24 UTC
I have setup the simulation exactly as specified in the repository. (dependencie… s, param settings etc)
mavproxy shows the message VisOdom: not Healhy
to reproduce the issue I have prepared a Dockerfile (will need Nvidia container toolkit for GPU rendering):
```
FROM ardupilot/ardupilot-dev-ros:latest
RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
RUN apt-get update
RUN apt-get install -y socat terminator gz-garden libsdformat12-dev rapidjson-dev libgflags-dev ros-humble-ament-cmake-mypy ros-humble-image-transport ros-humble-image-transport-plugins ros-humble-geographic-msgs
ENV GZ_VERSION=garden
ENV ROS_DISTRO=humble
RUN pip3 install mavproxy
VOLUME ["/ros2_ws"]
RUN mkdir -p /ros2_ws/src
WORKDIR /ros2_ws/src
# have tried with and without micro-ros
RUN git clone -b $ROS_DISTRO https://github.com/micro-ROS/micro_ros_setup.git micro_ros_setup
RUN wget https://raw.githubusercontent.com/ArduPilot/ardupilot_gz/main/ros2_gz.repos
RUN git clone https://github.com/ArduPilot/ardupilot_ros
RUN vcs import < ros2_gz.repos
WORKDIR /ros2_ws/src/ardupilot
RUN git submodule update --init --recursive
WORKDIR /ros2_ws
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.sh && \
apt-get update && \
rosdep update && \
rosdep install --rosdistro $ROS_DISTRO --from-paths src -i -r -y"
RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.sh && colcon build"
# For GPU support for gazebo
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
# append source to bashrc
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash;source /ros2_ws/install/setup.bash;" >> ~/.bashrc
```
bash script to build image:
```
#!/bin/bash
sudo docker build --no-cache -t $USER/test_sim .
```
bash script to launch simulation using Nvidia graphics card:
```
xhost +local:*
sudo docker run -it --rm -e DISPLAY=$DISPLAY \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--env="XAUTHORITY=$XAUTH" \
--volume="$XAUTH:$XAUTH" \
--runtime=nvidia \
--gpus all \
--privileged \
--net=host \
$USER/test_sim /bin/bash -c "terminator & terminator -e 'source /opt/ros/humble/setup.bash && source /ros2_ws/install/setup.bash && ros2 launch ardupilot_gz_bringup iris_maze.launch.py rviz:=false;/bin/bash ' & \
terminator -e 'source /opt/ros/humble/setup.bash && source /ros2_ws/install/setup.bash && ros2 launch ardupilot_ros cartographer.launch.py;/bin/bash' "
```
otherwise:
```
xhost +local:*
sudo docker run -it --rm -e DISPLAY=$DISPLAY \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--env="XAUTHORITY=$XAUTH" \
--volume="$XAUTH:$XAUTH" \
--privileged \
--net=host \
$USER/test_sim /bin/bash -c "terminator & terminator -e 'source /opt/ros/humble/setup.bash && source /ros2_ws/install/setup.bash && ros2 launch ardupilot_gz_bringup iris_maze.launch.py rviz:=false;/bin/bash ' & \
terminator -e 'source /opt/ros/humble/setup.bash && source /ros2_ws/install/setup.bash && ros2 launch ardupilot_ros cartographer.launch.py;/bin/bash' "
```
start mavproxy
```
mavproxy.py --console --map --aircraft test --master=:14550
```
Then parameters are set using mavproxy using the commands
```
param set AHRS_EKF_TYPE 3
param set EK2_ENABLE 0
param set EK3_ENABLE 1
param set EK3_SRC1_POSXY 6
param set EK3_SRC1_POSZ 1
param set EK3_SRC1_VELXY 6
param set EK3_SRC1_VELZ 6
param set EK3_SRC1_YAW 6
param set VISO_TYPE 1
param set ARMING_CHECK 388598
```
Then, SITL simulation is restarted.