Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming ign to gz #85

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
29c1ad3
Renaming ign to gz
ahcorde May 30, 2023
73ca375
Removed iron
ahcorde May 30, 2023
e42b142
Fixed env var CI
ahcorde May 30, 2023
18136f0
Fixed repositories
ahcorde May 30, 2023
95fca65
Fixed CI
ahcorde May 30, 2023
dc35a23
Fixed CI
ahcorde May 30, 2023
71079ff
Fixed CI
ahcorde May 30, 2023
bfbe468
Fixed CI
ahcorde May 30, 2023
ca371e1
Fixed CI
ahcorde May 30, 2023
dec5acb
Fixed package.zml
ahcorde May 30, 2023
174e126
spelling
ahcorde May 30, 2023
32126b4
Fixed CI
ahcorde May 30, 2023
04795d2
Fixed CI
ahcorde May 30, 2023
b9c758f
Fixed CI
ahcorde May 30, 2023
80191aa
Fixed CI
ahcorde May 30, 2023
67b1e6d
Fixed build
ahcorde May 30, 2023
467bf7f
Fixed CI
ahcorde May 30, 2023
d2cb2a2
Fixed CI
ahcorde May 30, 2023
f79f239
make linters happy
ahcorde May 30, 2023
e2cba93
Added fortress to CI
ahcorde May 30, 2023
050c5e7
gz-cmake utilities
ahcorde May 30, 2023
bb34344
utilities
ahcorde May 30, 2023
497537a
fix CI
ahcorde May 31, 2023
8395f3d
Fixed include
ahcorde May 31, 2023
8fb031e
Fixed include
ahcorde May 31, 2023
0be9a13
Fixed include
ahcorde May 31, 2023
cb7ec37
cleanup
ahcorde May 31, 2023
bea5908
Fixed CI
ahcorde May 31, 2023
9ef86d3
Fixed CI
ahcorde May 31, 2023
bfeeb45
Fixed CI
ahcorde May 31, 2023
c33c19e
Fixed CI
ahcorde May 31, 2023
619a28b
Fixed CI
ahcorde May 31, 2023
d453c78
Fixed CI
ahcorde May 31, 2023
52e5d52
another attemp
ahcorde May 31, 2023
c96fa3c
another attemp
ahcorde May 31, 2023
2f0016b
another attemp
ahcorde May 31, 2023
67003eb
another attemp
ahcorde May 31, 2023
06836d4
make linters happy
ahcorde May 31, 2023
fa76a0a
Ignition to Gazebo
ahcorde May 31, 2023
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
45 changes: 31 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ignition RViz CI
name: Gazebo RViz CI

on: [push, pull_request]

Expand All @@ -7,26 +7,43 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ignition: ['fortress']
ros: ['rolling']
gazebo: ['fortress', 'garden']
ros: ['humble', 'rolling']
container:
image: osrf/ros:${{ matrix.ros }}-desktop
env:
IGNITION_VERSION: ${{ matrix.ignition }}
GZ_VERSION: ${{ matrix.gazebo }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
apt update -qq
apt install -qq -y lsb-release wget curl gnupg2 git
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null
wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
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" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
apt update -y
apt install -y wget
sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
apt update -y
apt install -y libignition-common4-dev \
libignition-math6-dev \
libignition-rendering6-dev \
libignition-gui6-dev
echo "Gazebo version " $GZ_VERSION
if [ "$GZ_VERSION" == "garden" ]; then
apt install -y libgz-cmake3-dev \
libgz-common5-dev \
libgz-math7-dev \
libgz-plugin2-dev \
libgz-rendering7-dev \
libgz-gui7-dev
fi

if [ "$GZ_VERSION" == "fortress" ]; then
apt install -y libignition-cmake2-dev \
libignition-common4-dev \
libignition-math6-dev \
libignition-plugin-dev \
libignition-rendering6-dev \
libignition-gui6-dev
fi
shell: bash
- name: Setup colcon workspace
id: configure
run: |
Expand All @@ -38,7 +55,7 @@ jobs:
run: |
cd /home/colcon_ws/
. /opt/ros/${{ matrix.ros }}/setup.sh
colcon build
colcon build --event-handlers console_direct+
- name: Run tests
id: test
run: |
Expand Down
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Ignition RViz
# Gazebo RViz

[RViz](http://wiki.ros.org/rviz) is a 3D visualization tool for robots using ROS.

Ignition RViz offers functionality similar to RViz, and is developed using
[Ignition](https://ignitionrobotics.org/) libraries.
Gazebo RViz offers functionality similar to RViz, and is developed using
[Gazebo](https://gazebosim.org/) libraries.

### Build Status

* ROS versions: Rolling (Humble)
* Ignition versions: Fortress
* Gazebo versions: Fortress or Garden

[![Ignition RViz CI](https://github.com/ignitionrobotics/ign-rviz/actions/workflows/ci.yml/badge.svg)](https://github.com/ignitionrobotics/ign-rviz/actions/workflows/ci.yml)
[![Gazebo RViz CI](https://github.com/gazebosim/gz-rviz/actions/workflows/ci.yml/badge.svg)](https://github.com/gazebosim/gz-rviz/actions/workflows/ci.yml)

Head over to the [wiki](https://github.com/ignitionrobotics/ign-rviz/wiki) to get detailed description of the project.
Head over to the [wiki](https://github.com/gazebosim/gz-rviz/wiki) to get detailed description of the project.

### Requirements

- [ROS 2 Foxy or Rolling](https://docs.ros.org/en/rolling/Releases.html)
- [Ignition Fortress](https://ignitionrobotics.org/docs/)
- [Ignition Common](https://ignitionrobotics.org/libs/common)
- [Ignition GUI](https://ignitionrobotics.org/libs/gui)
- [Ignition Math](https://ignitionrobotics.org/libs/math)
- [Ignition Rendering](https://ignitionrobotics.org/libs/rendering)
- [ROS 2](https://docs.ros.org/en/rolling/Releases.html)
- [Gazebo](https://gazebosim.org/docs/)
- [Gazebo Common](https://gazebosim.org/libs/common)
- [Gazebo GUI](https://gazebosim.org/libs/gui)
- [Gazebo Math](https://gazebosim.org/libs/math)
- [Gazebo Rendering](https://gazebosim.org/libs/rendering)
- [Qt5](https://www.qt.io/)
- Additional QML modules required for GPS Plugin
- [QtPositioning](https://doc.qt.io/qt-5/qtpositioning-index.html) (`qml-module-qtpositioning`)
Expand All @@ -39,20 +39,20 @@ cd ~/colcon_ws/src
**Clone the repository**

```bash
git clone https://github.com/ignitionrobotics/ign-rviz.git
git clone https://github.com/gazebosim/gz-rviz.git
```

**Choose an Ignition version**
**Choose an Gazebo version**

```bash
export IGNITION_VERSION=<ignition>
export GZ_VERSION=<gazebo version>
```

Where `<ignition>` should be `fortress`.
Where `<gazebo>` should be `fortress` or `garden`.

> You only need to set this variable when compiling, not when running.

**Build ign-rviz**
**Build gz-rviz**

Go to the root of your colcon workspace

Expand All @@ -67,30 +67,30 @@ source /opt/ros/<distro>/setup.bash # If using bash
source /opt/ros/<distro>/setup.zsh # If using zsh
```

Build ign-rviz
Build gz-rviz

```bash
colcon build
```

### Launch ign-rviz
### Launch gz-rviz

Ignition Rviz can be launched using the following command
Gazebo Rviz can be launched using the following command

```bash
# Source the workspace
source install/setup.zsh

# Launch ign-rviz
ros2 launch ign_rviz rviz.launch.py
# Launch gz-rviz
ros2 launch gz_rviz rviz.launch.py
```

### Instruction to generate documentation

Project documentation can be generated with the help of doxygen using the following commands.

```bash
cd ~/colcon_ws/src/ign-rviz/docs/
cd ~/colcon_ws/src/gz-rviz/docs/

# Generate documentation
doxygen rviz.doxyfile
Expand All @@ -106,5 +106,5 @@ firefox ./html/index.html
# Source ROS2
ros2 run image_tools cam2image
```
2. Launch ign-rviz as mentioned above
2. Launch gz-rviz as mentioned above
3. Load an `ImageDisplay` plugin and select the published topic.
8 changes: 4 additions & 4 deletions docs/rviz.doxyfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Doxyfile 1.8.13

PROJECT_NAME = "Ignition RViz"
PROJECT_NAME = "Gazebo RViz"

PROJECT_NUMBER = 0.1

PROJECT_BRIEF = "RViz developed using ignition rendering"

INPUT = ../README.md \
../ign_rviz_common/ \
../ign_rviz_plugins/ \
../ign_rviz/
../gz_rviz_common/ \
../gz_rviz_plugins/ \
../gz_rviz/

RECURSIVE = YES

Expand Down
File renamed without changes.
69 changes: 35 additions & 34 deletions ign_rviz/CMakeLists.txt → gz_rviz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(ign_rviz)
project(gz_rviz)

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
Expand Down Expand Up @@ -31,52 +31,53 @@ find_package(tf2_msgs REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(visualization_msgs REQUIRED)

# Ignition libraries
find_package(ign_rviz_common REQUIRED)
find_package(ign_rviz_plugins REQUIRED)
find_package(ignition-math6 REQUIRED)
# Gazebo libraries
find_package(gz_rviz_common REQUIRED)
find_package(gz_rviz_plugins REQUIRED)

# Default to Fortress
find_package(ignition-gui6 REQUIRED)
set(IGN_GUI_VER ${ignition-gui6_VERSION_MAJOR})
# Gazebo Libraries
if("$ENV{GZ_VERSION}" STREQUAL "garden")
find_package(gz-math7 REQUIRED)
set(GZ_MATH gz-math7)

find_package(ignition-common4 REQUIRED)
set(IGN_COMMON_VER ${ignition-common4_VERSION_MAJOR})
find_package(gz-gui7 REQUIRED)
set(GZ_GUI gz-gui7)

message(STATUS "Compiling against Ignition Fortress")
find_package(gz-common5 REQUIRED)
set(GZ_COMMON gz-common5)

qt5_add_resources(resources_RCC include/ignition/rviz/rviz.qrc)
message(STATUS "Compiling against Gazebo Garden")
else()
find_package(ignition-math6 REQUIRED)
set(GZ_MATH ignition-math6)

include_directories(SYSTEM
${IGNITION-COMMON_INCLUDE_DIRS}
${IGNITION-GUI_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Qml_INCLUDE_DIRS}
${Qt5Quick_INCLUDE_DIRS}
${Qt5QuickControls2_INCLUDE_DIRS}
)
find_package(ignition-gui6 REQUIRED)
set(GZ_GUI ignition-gui6)

link_directories(
${IGNITION-COMMON_LIBRARY_DIRS}
${IGNITION-GUI_LIBRARY_DIRS}
${IGNITION-MATH_LIBRARY_DIRS}
)
find_package(ignition-common4 REQUIRED)
set(GZ_COMMON ignition-common4)

message(STATUS "Compiling against Gazebo Fortress")
endif()

qt5_add_resources(resources_RCC include/gz/rviz/rviz.qrc)

include_directories(include)

add_executable(ign_rviz
add_executable(gz_rviz
src/rviz/application.cpp
src/rviz/rviz.cpp
include/ignition/rviz/rviz.hpp
include/gz/rviz/rviz.hpp
${resources_RCC}
)

ament_target_dependencies(ign_rviz
ament_target_dependencies(gz_rviz
ament_index_cpp
ign_rviz_common
ign_rviz_plugins
ignition-math6
ignition-gui${IGN_GUI_VER}
gz_rviz_common
gz_rviz_plugins
${GZ_COMMON}
${GZ_GUI}
${GZ_MATH}
geometry_msgs
nav_msgs
rclcpp
Expand All @@ -86,9 +87,9 @@ ament_target_dependencies(ign_rviz
visualization_msgs
)

target_link_libraries(ign_rviz Qt5::Core Qt5::Qml Qt5::Quick Qt5::QuickControls2)
target_link_libraries(gz_rviz Qt5::Core Qt5::Qml Qt5::Quick Qt5::QuickControls2)

install(TARGETS ign_rviz
install(TARGETS gz_rviz
DESTINATION lib/${PROJECT_NAME})

install(DIRECTORY launch
Expand Down
2 changes: 2 additions & 0 deletions gz_rviz/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Gazebo RViz
ROS package for RViz developed using Gazebo Rendering Library.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IGNITION__RVIZ__RVIZ_HPP_
#define IGNITION__RVIZ__RVIZ_HPP_
#ifndef GZ__RVIZ__RVIZ_HPP_
#define GZ__RVIZ__RVIZ_HPP_

#include <iostream>
#include <memory>
#include <string>
#include <vector>

#ifndef Q_MOC_RUN
#include <ignition/gui/qt.h>
#include <ignition/gui/Application.hh>
#include <gz/gui/qt.h>
#include <gz/gui/Application.hh>
#endif

#include <rclcpp/rclcpp.hpp>

#include <ignition/rviz/plugins/message_display_base.hpp>
#include <gz/rviz/plugins/message_display_base.hpp>

namespace ignition
namespace gz
{
namespace rviz
{
Expand Down Expand Up @@ -210,6 +210,6 @@ class RViz : public QObject
};

} // namespace rviz
} // namespace ignition
} // namespace gz

#endif // IGNITION__RVIZ__RVIZ_HPP_
#endif // GZ__RVIZ__RVIZ_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
def generate_launch_description():
return LaunchDescription([
launch_ros.actions.Node(
package='ign_rviz', executable='ign_rviz', output='screen'
package='gz_rviz', executable='gz_rviz', output='screen'
),
])
40 changes: 40 additions & 0 deletions gz_rviz/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>gz_rviz</name>
<version>0.0.1</version>
<description>RViz developed using Gazebo libraries</description>

<maintainer email="alejandro@openrobotics.com">Alejandro Hernández</maintainer>
<license>Apache License, Version 2.0</license>
<author>Sarathkrishnan Ramesh</author>

<depend>geometry_msgs</depend>
<depend>gz_rviz_common</depend>
<depend>gz_rviz_plugins</depend>
<depend>nav_msgs</depend>
<depend>rclcpp</depend>
<depend>sensor_msgs</depend>
<depend>tf2_geometry_msgs</depend>
<depend>tf2_msgs</depend>
<depend>tf2_ros</depend>
<depend>visualization_msgs</depend>

<!-- Fortress (default) -->
<depend condition="$GZ_VERSION == 'fortress'">ignition-common4</depend>
<depend condition="$GZ_VERSION == 'fortress'">ignition-gui6</depend>
<depend condition="$GZ_VERSION == 'fortress'">ignition-math6</depend>
<depend condition="$GZ_VERSION == 'garden'">gz-common5</depend>
<depend condition="$GZ_VERSION == 'garden'">gz-gui7</depend>
<depend condition="$GZ_VERSION == 'garden'">gz-math7</depend>
<depend condition="$GZ_VERSION == ''">ignition-common4</depend>
<depend condition="$GZ_VERSION == ''">ignition-gui6</depend>
<depend condition="$GZ_VERSION == ''">ignition-math6</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
Loading