Gazebo | Ignition | Community
Ask Your Question
0

Running Ignition Fortress Headless in Docker Environment for Continous Integration using rostest

asked 2021-12-26 00:56:19 -0600

Illuminatur gravatar image

updated 2022-01-05 04:33:05 -0600

Dear Ignition Community,

i am trying to integrate IGNITION GAZEBO FORTRESS into a Continous Integration Pipeline in GITLAB using Docker Container. Therefore, the installation instructions are followed inside Docker [1]. The linting steps, build steps, etc. are working so far.

For the test stage i have defined a *.test, where the ros_ign parameter bridge as well as ignition gazebo are to be started, since my test class is working on subscribed ROS topic, which are to be interpreted in terms of statistics (are the lidars receiving the right intensities, reflections, and so on ...).

The rostest file looks like:

<?xml version="1.0"?>
<launch>
    <include file="$(find ign_semivirtual_testarea)/test/test_ros_gpu_lidar_subscriber.launch"/>
    <test test-name="test_ros_gpu_lidar_subscriber" pkg="my_ign_pkg" type="test_ros_gpu_lidar_subscriber" time-limit="180.0" />
</launch>

The referenced test_ros_gpu_lidar_subscriber.launch file looks like:

<?xml version="1.0"?>
    <launch>
      <!-- Launch the bridge -->
      <node name="parameter_bridge_ros_subscriber" pkg="ros_ign_bridge" type="parameter_bridge" args="/lidar@sensor_msgs/LaserScan@ignition.msgs.LaserScan /lidar/points@sensor_msgs/PointCloud2@ignition.msgs.PointCloudPacked"/>
      <include file="$(find ros_ign_gazebo)/launch/ign_gazebo.launch">
        <arg name="ign_args" value="-r -s -v 4 gpu_lidar_retro_values_sensor.sdf --headless"/>
      </include>
</launch>

Since I have no rendering window available, i thought the recently released and mentioned EGL headless mode [2], would be the ideal application to enable a renderless runner via

 ign gazebo -s --headless-rendering

But when my CI pipeline comes the the test stage, where i am going to run some rostests based on the execution of launch files, i obtain the following error:

[Err] [Ogre2RenderEngine.cc:394] Unable to open display: terminate called after throwing an instance of 'Ogre::RenderingAPIException' what(): OGRE EXCEPTION(3:RenderingAPIException): No Interface could be loaded. Check previous error messages.Try disabling OpenGL plugin from plugins.cfg. in GlSwitchableSupport::GlSwitchableSupport at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/windowing/OgreGlSwitchableSupport.cpp (line 81) Stack trace (most recent call last) in thread 7386:

Are there any indications why this fails? Are there positive experiences integrating rostests with IGNITION GAZEBO (FORTRESS) within Docker headless?

Update:

Using the hints from the dolly example in the comments below

export DISPLAY=:1.0
export MESA_GL_VERSION_OVERRIDE=3.3

result to the following error:

[Err] [Ogre2RenderEngine.cc:394] Unable to open display: :1.0 terminate called after throwing an instance of 'Ogre::RenderingAPIException' what(): OGRE EXCEPTION(3:RenderingAPIException): No Interface could be loaded. Check previous error messages.Try disabling OpenGL plugin from plugins.cfg. in GlSwitchableSupport::GlSwitchableSupport at /var/lib/jenkins/workspace/ogre-2.2-debbuilder/repo/RenderSystems/GL3Plus/src/windowing/OgreGlSwitchableSupport.cpp (line 81) Stack trace (most recent call last) in thread 8069:

I can think of two reasons for this:

  • Somehow, the combination of mesa/opengl/ogre-library combination does not fit well. But since i am installing the libraries as the default ignition tutorial proposes, this should work.
  • Second, maybe and somehow the way how my tests are build up using rostest and therefore starting ingition via launch-files (and the headless parameter) could also potentially bring in some problems. The dolly example is based on a dedicated test fixture class [3] starting up ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-12-28 17:14:39 -0600

chapulina gravatar image

Are there positive experiences integrating rostests with IGNITION GAZEBO (FORTRESS) within Docker headless?

Here's an example: https://github.com/chapulina/dolly/pu...

Maybe what you're missing are these environment variables:

export DISPLAY=:1.0
export MESA_GL_VERSION_OVERRIDE=3.3
edit flag offensive delete link more

Comments

Hey chapulina,

thx lot. I just tried that solution, but that doesnt seem to work. Due to the limited amount of characters I am going to extend my problem statement above.

BR, Marc

Illuminatur gravatar imageIlluminatur ( 2022-01-05 04:21:12 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-12-26 00:56:19 -0600

Seen: 35 times

Last updated: Jan 05