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 6 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
44 changes: 30 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,48 @@
name: Ignition RViz CI
name: Gazebo RViz CI

on: [push, pull_request]
on:
pull_request:
push:
branches: [ master ]

jobs:
build:
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
id: configure
shell: bash
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
if [ "$GZ_VERSION" == "garden" ]; then
apt install -y libgz-common5-dev \
libgz-math7-dev \
libgz-rendering7-dev \
libgz-gui7-dev
fi

if [ "$GZ_VERSION" == "fortress" ]; then
apt install -y libignition-common4-dev \
libignition-math6-dev \
libignition-rendering6-dev \
libignition-gui6-dev
fi
- name: Setup colcon workspace
id: configure
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 fz-rviz
ahcorde marked this conversation as resolved.
Show resolved Hide resolved

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.
70 changes: 36 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,54 @@ 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)
# ition libraries
ahcorde marked this conversation as resolved.
Show resolved Hide resolved
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 "fortress")
find_package(ignition-math6 REQUIRED)
set(GZ_MATH ignition-math6)

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

message(STATUS "Compiling against Ignition Fortress")
find_package(ignition-common4 REQUIRED)
set(GZ_COMMON ignition-common4)

qt5_add_resources(resources_RCC include/ignition/rviz/rviz.qrc)
message(STATUS "Compiling against Gazebo Fortress")

include_directories(SYSTEM
${IGNITION-COMMON_INCLUDE_DIRS}
${IGNITION-GUI_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Qml_INCLUDE_DIRS}
${Qt5Quick_INCLUDE_DIRS}
${Qt5QuickControls2_INCLUDE_DIRS}
)
else()
find_package(gz-math7 REQUIRED)
set(GZ_MATH gz-math7)

link_directories(
${IGNITION-COMMON_LIBRARY_DIRS}
${IGNITION-GUI_LIBRARY_DIRS}
${IGNITION-MATH_LIBRARY_DIRS}
)
find_package(gz-gui7 REQUIRED)
set(GZ_GUI gz-gui7)

find_package(gz-common5 REQUIRED)
set(GZ_COMMON gz-common5)

message(STATUS "Compiling against Gazebo Garden")
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 +88,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,32 @@
// 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>

#ifdef GZ_HEADERS
#ifndef Q_MOC_RUN
#include <gz/gui/qt.h>
#include <gz/gui/Application.hh>
#endif
using namespace gz;
#else
#ifndef Q_MOC_RUN
#include <ignition/gui/qt.h>
#include <ignition/gui/Application.hh>
#endif

using namespace ignition;
#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 @@ -212,4 +220,4 @@ class RViz : public QObject
} // namespace rviz
} // namespace ignition

#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'
),
])
19 changes: 12 additions & 7 deletions ign_rviz/package.xml → gz_rviz/package.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<?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>ign_rviz</name>
<name>gz_rviz</name>
<version>0.0.1</version>
<description>RViz developed using Ignition libraries</description>

<maintainer email="sarathkrishnan99@gmail.com">Sarathkrishnan Ramesh</maintainer>
<description>RViz developed using Gazebo libraries</description>

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

<depend>geometry_msgs</depend>
<depend>ign_rviz_common</depend>
<depend>ign_rviz_plugins</depend>
<depend>ignition-math6</depend>
<depend>gz_rviz_common</depend>
<depend>gz_rviz_plugins</depend>
<depend>nav_msgs</depend>
<depend>rclcpp</depend>
<depend>sensor_msgs</depend>
Expand All @@ -22,9 +21,15 @@
<depend>visualization_msgs</depend>

<!-- Fortress (default) -->
<depend condition="$IGNITION_VERSION == 'fortress'">ignition-common4</depend>
<depend condition="$IGNITION_VERSION == 'fortress'">ignition-gui6</depend>
<depend condition="$IGNITION_VERSION == 'fortress'">ignition-math6</depend>
mjcarroll marked this conversation as resolved.
Show resolved Hide resolved
<depend condition="$IGNITION_VERSION == 'garden'">gz-common5</depend>
<depend condition="$IGNITION_VERSION == 'garden'">gz-gui7</depend>
<depend condition="$IGNITION_VERSION == 'garden'">gz-math7</depend>
<depend condition="$IGNITION_VERSION == ''">ignition-common4</depend>
<depend condition="$IGNITION_VERSION == ''">ignition-gui6</depend>
<depend condition="$IGNITION_VERSION == ''">ignition-math6</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
Expand Down
Loading