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 GUI_OV2SLAM/CMakeLists.txt → CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ find_package(sensor_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(tf2_ros REQUIRED)

find_package(cv_bridge REQUIRED)
find_package(OpenCV REQUIRED)
# Znajdź OpenGL i GLFW
find_package(OpenGL REQUIRED)
find_package(glfw3 REQUIRED)
Expand Down Expand Up @@ -54,13 +55,15 @@ target_include_directories(imgui_visualizer PUBLIC
${IMGUI_DIR}
${IMGUI_DIR}/backends
${IMPLOT_DIR}
${OpenCV_INCLUDE_DIRS}
)

# Link libraries
target_link_libraries(imgui_visualizer
OpenGL::GL
glfw
GLEW::GLEW
${OpenCV_LIBS}
)

# ROS 2 dependencies
Expand All @@ -71,6 +74,7 @@ ament_target_dependencies(imgui_visualizer
geometry_msgs
nav_msgs
tf2_ros
cv_bridge
)

# Install executable
Expand Down
32 changes: 26 additions & 6 deletions GUI_OV2SLAM/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ WORKDIR /ws/src/imgui_app/Thirdparty
RUN git clone https://github.com/ocornut/imgui.git
WORKDIR /ws/src/imgui_app/Thirdparty/imgui
RUN git checkout docking
# ImGui to header-only library, nie wymaga kompilacji
##############
### Logo #####
##############

##################
### ImPlot ###
##################
WORKDIR /ws/src/imgui_app/Thirdparty
RUN git clone https://github.com/epezent/implot.git
# ImPlot również header-only

###################
### GLM (math) ###
Expand All @@ -70,11 +71,21 @@ RUN apt update \
ros-${ROS_DISTRO}-tf2 \
ros-${ROS_DISTRO}-tf2-ros \
ros-${ROS_DISTRO}-tf2-geometry-msgs \
ros-${ROS_DISTRO}-image-transport \
ros-${ROS_DISTRO}-cv-bridge \
ros-${ROS_DISTRO}-pcl-ros \
ros-${ROS_DISTRO}-pcl-conversions \
ros-${ROS_DISTRO}-visualization-msgs \
&& rm -rf /var/lib/apt/lists/*
######################
### Cyclone DDS ###
######################
RUN apt update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
&& rm -rf /var/lib/apt/lists/*
###################
### OpenCV ###
###################
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
libopencv-dev \
&& rm -rf /var/lib/apt/lists/*

############################
Expand All @@ -83,6 +94,11 @@ RUN apt update \
ADD . /ws/src/imgui_app

WORKDIR /ws

COPY logo.png /ws/src/imgui_app/logo.png

RUN mkdir -p /ws/trajectories

RUN . /opt/ros/$ROS_DISTRO/setup.sh && colcon build --symlink-install

# Ustaw zmienne środowiskowe dla X11
Expand All @@ -93,6 +109,10 @@ ENV QT_X11_NO_MITSHM=1
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc
RUN echo "source /ws/install/setup.bash" >> ~/.bashrc

# Ustaw Cyclone DDS jako domyślny
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ENV ROS_DOMAIN_ID=0

WORKDIR /ws

CMD ["/bin/bash"]
173 changes: 0 additions & 173 deletions GUI_OV2SLAM/src/main.cpp

This file was deleted.

37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# GUI_OV2SLAM
PowerViz to aplikacja GUI pozwalająca na żywo wizualizować mi.n parametry takie jak pozycja, prędkość, obraz, trajektora czy chmura punktów z $OV^2SLAM$
<img width="1786" height="977" alt="Screenshot from 2025-12-07 16-40-43" src="https://github.com/user-attachments/assets/1da78d87-56bf-4f75-b3cb-b1d9bd3a27a8" />
## Uruchomienie
Na początku pobieramy repozytorium
```bash
git clone https://github.com/PUT-POWERTRAIN/GUI_OV2SLAM.git
```
Następnie wchodzimy w folder repozytorium
```bash
cd GUI_OV2SLAM
```
Budujemy dockera
```bash
docker build -t imgui_ros2_gui:latest .
```
Następnie musimy dać dockerowi uprawnienia do wyświetlania okien na ekranie
```bash
xhost +local:docker
```
I uruchamiamy dockera tą komendą
```bash
docker run -it --rm \
--name imgui_gui \
--network host \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
imgui_ros2_gui:latest
```
Będąc w dockerze musimy zsourcować środowisko
```bash
source /ws/install/setup.bash
```
Ostatecznie gdy chcemy uruchomić aplikację włączamy plik launch
```bash
ros2 launch imgui_app visualizer.launch.py
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,39 @@
from launch.substitutions import LaunchConfiguration

def generate_launch_description():
# Deklaruj argumenty launch (opcjonalne - można je nadpisać z CLI)
# Deklaruj argumenty launch
vo_pose_topic_arg = DeclareLaunchArgument(
'vo_pose_topic',
default_value='/vo_pose',
description='Topic name for VO pose'
)



image_track_topic_arg = DeclareLaunchArgument(
'image_track_topic',
default_value='/image_track',
description='Topic name for image tracking'
)
point_cloud_topic_arg = DeclareLaunchArgument(
'point_cloud_topic',
default_value='/point_cloud',
description='Topic name for point cloud tracking'
)
# Node z parametrami
visualizer_node = Node(
package='imgui_app', # Zmień na nazwę swojego pakietu
executable='imgui_visualizer', # Nazwa pliku wykonywalnego
package='imgui_app',
executable='imgui_visualizer',
name='imgui_visualizer',
output='screen',
parameters=[{
'vo_pose_topic': LaunchConfiguration('vo_pose_topic'),

'image_track_topic': LaunchConfiguration('image_track_topic'),
'point_cloud_topic': LaunchConfiguration('point_cloud_topic'),
}]
)

return LaunchDescription([
vo_pose_topic_arg,

image_track_topic_arg,
point_cloud_topic_arg,
visualizer_node
])
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Loading