-
Notifications
You must be signed in to change notification settings - Fork 464
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
add cross-platform CI with conda packages #1600
Draft
wolfv
wants to merge
1
commit into
ros-visualization:noetic-devel
Choose a base branch
from
RoboStack:noetic-add-test
base: noetic-devel
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: test | ||
channels: | ||
- robostack | ||
- conda-forge | ||
dependencies: | ||
# build deps | ||
- compilers | ||
- ninja | ||
- cmake | ||
- catkin_pkg | ||
# Other deps | ||
- assimp | ||
- eigen | ||
- ogre 1.10.* | ||
- python 3.8.* | ||
- qt 5.12.* | ||
- ros-distro-mutex 0.1 noetic | ||
- ros-noetic-catkin | ||
- ros-noetic-cmake-modules | ||
- ros-noetic-geometry-msgs | ||
- ros-noetic-image-transport | ||
- ros-noetic-interactive-markers | ||
- ros-noetic-laser-geometry | ||
- ros-noetic-map-msgs | ||
- ros-noetic-message-filters | ||
- ros-noetic-message-generation | ||
- ros-noetic-nav-msgs | ||
- ros-noetic-pluginlib | ||
- ros-noetic-python-qt-binding | ||
- ros-noetic-resource-retriever | ||
- ros-noetic-rosbag | ||
- ros-noetic-rosconsole | ||
- ros-noetic-roscpp | ||
- ros-noetic-roslib | ||
- ros-noetic-rospy | ||
- ros-noetic-rostest | ||
- ros-noetic-rosunit | ||
- ros-noetic-sensor-msgs | ||
- ros-noetic-std-msgs | ||
- ros-noetic-std-srvs | ||
- ros-noetic-tf2-geometry-msgs | ||
- ros-noetic-tf2-ros | ||
- ros-noetic-urdf | ||
- ros-noetic-visualization-msgs | ||
- tinyxml2 | ||
- urdfdom 1.0.* | ||
- urdfdom_headers 1.0.* | ||
- yaml-cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Build RViz on all platforms | ||
|
||
on: push | ||
|
||
jobs: | ||
run_rviz_compilation: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Dependencies | ||
uses: mamba-org/provision-with-micromamba@main | ||
with: | ||
environment-file: .github/ci_env.yml | ||
- name: Install System Dependencies | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get install libglew-dev mesa-utils xvfb libgl1-mesa-glx libgl1-mesa-dev libglu1-mesa libglu1-mesa-dev \ | ||
libselinux1 libxdamage1 libxfixes3 libxxf86vm1 | ||
|
||
- name: Build RViz on Unix | ||
if: runner.os == 'Linux' || runner.os == 'macOS' | ||
shell: bash -l -eo pipefail {0} | ||
run: | | ||
if [[ `uname -s` == "Linux" ]]; then | ||
CDT="-cos6-x86_64" | ||
micromamba install -y mesa-libgl-devel$CDT mesa-dri-drivers$CDT \ | ||
libselinux$CDT libxdamage$CDT libxxf86vm$CDT \ | ||
libxext$CDT libxfixes$CDT -c conda-forge | ||
fi | ||
|
||
export CTEST_OUTPUT_ON_FAILURE=1 | ||
|
||
mkdir build | ||
cd build | ||
|
||
cmake .. -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ | ||
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCATKIN_SKIP_TESTING=OFF \ | ||
-G "Ninja" | ||
|
||
ninja | ||
ninja run_tests | ||
|
||
- name: Build RViz on Windows | ||
if: runner.os == 'Windows' | ||
shell: powershell | ||
run: | | ||
micromamba shell hook -s cmd.exe -p C:\Users\runneradmin\micromamba | ||
Get-Content -Path C:\Users\runneradmin\micromamba\condabin\mamba_hook.bat | ||
|
||
- name: Build RViz on Windows | ||
if: runner.os == 'Windows' | ||
shell: cmd | ||
run: | | ||
|
||
echo "Remove unnecessary / colliding things from PATH" | ||
|
||
set "PATH=%PATH:C:\ProgramData\Chocolatey\bin;=%" | ||
set "PATH=%PATH:C:\Program Files (x86)\sbt\bin;=%" | ||
set "PATH=%PATH:C:\Rust\.cargo\bin;=%" | ||
set "PATH=%PATH:C:\Program Files\Git\usr\bin;=%" | ||
set "PATH=%PATH:C:\Program Files\Git\cmd;=%" | ||
set "PATH=%PATH:C:\Program Files\Git\mingw64\bin;=%" | ||
set "PATH=%PATH:C:\Program Files (x86)\Subversion\bin;=%" | ||
set "PATH=%PATH:C:\Program Files\CMake\bin;=%" | ||
set "PATH=%PATH:C:\Program Files\OpenSSL\bin;=%" | ||
set "PATH=%PATH:C:\Strawberry\c\bin;=%" | ||
set "PATH=%PATH:C:\Strawberry\perl\bin;=%" | ||
set "PATH=%PATH:C:\Strawberry\perl\site\bin;=%" | ||
set "PATH=%PATH:c:\tools\php;=%" | ||
:: Make paths like C:\\hostedtoolcache\\windows\\Ruby\\2.5.7\\x64\\bin garbage | ||
set "PATH=%PATH:ostedtoolcache=%" | ||
|
||
echo "Activate environment, and compile" | ||
|
||
call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate test | ||
|
||
SET "PYTHONPATH=%CONDA_PREFIX%\Library\lib\site-packages" | ||
|
||
mkdir build | ||
cd build | ||
SET "CTEST_OUTPUT_ON_FAILURE=1" | ||
|
||
cmake .. -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library" ^ | ||
-DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%\Library" ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DCATKIN_SKIP_TESTING=OFF ^ | ||
-DBoost_USE_STATIC_LIBS=OFF ^ | ||
-G "Ninja" | ||
|
||
ninja | ||
ninja run_tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ | |
#include <OgreRectangle2D.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should remove the changes that are from #1532 and discuss them there instead. |
||
#include <OgreRenderSystem.h> | ||
#include <OgreRenderWindow.h> | ||
#include <OgreRoot.h> | ||
#include <OgreSceneManager.h> | ||
#include <OgreSceneNode.h> | ||
#include <OgreTextureManager.h> | ||
|
@@ -102,6 +103,8 @@ CameraDisplay::CameraDisplay() | |
SLOT(forceRender())); | ||
zoom_property_->setMin(0.00001); | ||
zoom_property_->setMax(100000); | ||
|
||
has_run_once_ = false; | ||
} | ||
|
||
CameraDisplay::~CameraDisplay() | ||
|
@@ -127,8 +130,15 @@ void CameraDisplay::onInitialize() | |
{ | ||
ImageDisplayBase::onInitialize(); | ||
|
||
bg_scene_node_ = scene_node_->createChildSceneNode(); | ||
fg_scene_node_ = scene_node_->createChildSceneNode(); | ||
{ | ||
static uint32_t count = 0; | ||
std::stringstream ss; | ||
ss << "CameraDisplay" << count++; | ||
camera_scene_manager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC, ss.str()); | ||
} | ||
|
||
bg_scene_node_ = camera_scene_manager_->getRootSceneNode()->createChildSceneNode(); | ||
fg_scene_node_ = camera_scene_manager_->getRootSceneNode()->createChildSceneNode(); | ||
|
||
{ | ||
static int count = 0; | ||
|
@@ -189,6 +199,7 @@ void CameraDisplay::onInitialize() | |
render_panel_->getRenderWindow()->setActive(false); | ||
render_panel_->resize(640, 480); | ||
render_panel_->initialize(context_->getSceneManager(), context_); | ||
// render_panel_->initialize(camera_scene_manager_, context_); | ||
|
||
setAssociatedWidget(render_panel_); | ||
|
||
|
@@ -212,8 +223,16 @@ void CameraDisplay::onInitialize() | |
void CameraDisplay::preRenderTargetUpdate(const Ogre::RenderTargetEvent& /*evt*/) | ||
{ | ||
QString image_position = image_position_property_->getString(); | ||
bg_scene_node_->setVisible(caminfo_ok_ && (image_position == BACKGROUND || image_position == BOTH)); | ||
fg_scene_node_->setVisible(caminfo_ok_ && (image_position == OVERLAY || image_position == BOTH)); | ||
|
||
if (has_run_once_) | ||
{ | ||
fg_scene_node_->setVisible(caminfo_ok_ && (image_position == OVERLAY || image_position == BOTH)); | ||
bg_scene_node_->setVisible(caminfo_ok_ && (image_position == BACKGROUND || image_position == BOTH)); | ||
} | ||
else | ||
{ | ||
has_run_once_ = true; | ||
} | ||
|
||
// set view flags on all displays | ||
visibility_property_->update(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think it's actually Ogre > 1.10 that has changed format, not >= 1.10. As we use Ogre 1.10 in RoboStack, this causes issues. But to be confirmed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you end up with 1.10? You could solve this by updating to 1.12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does rviz work with 1.12? If yes, we could totally attempt a build!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noetic-devel
does, yes, I tried getting it set as the default for noetic actually but gazebo had already released their last ever release and have some issues with itThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we also have gazebo on conda forge and it would be better if rviz and gazebo are side by side installable, so it's the same problem. We could build a variant with updated ogre though