0
Help us understand the problem. What are the problem?

posted at

Let's try Ignition Fortress

Let's try Ignition Fortress

out of curiosity, just wanted to try out Ignition Gazebo Simulator from source code build.

Environment

  • Ubuntu 20.04 Docker Container
  • Nvidia Runtime Acceleration
  • Ignition Fortress

Nvidia Runtime

to access hardware via container, we need to install nvidia-docker2, which enables backend runtime to be issued by docker --gpus option.
the procedure is really easy and described in container-toolkit/install-guide.

with nvidia container runtime, we can see that it can access GPUs from container as following.

>docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
Thu Dec 16 06:42:31 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.73.01    Driver Version: 460.73.01    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 105...  Off  | 00000000:01:00.0  On |                  N/A |
| 49%   46C    P0    N/A /  75W |    763MiB /  4036MiB |      3%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

Ignition Build & Run

  • start container runtime with GPUs
# this is required to allow access to host window system
>xhost +

# instantiate docker container
>docker run --gpus all -it --privileged -e DISPLAY="$DISPLAY" --network host --name ubuntu20_ign --volume="$HOME/.Xauthority:/root/.Xauthority:rw" -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/tomoyafujita/DVT/docker_ws:/root/docker_ws nvidia/opengl:base

# glmarks / glxinfo should be working
> apt update
> apt install -y glmark2 mesa-utils
>glmark2
...
>glxinfo
...
  • ignition source build

refer to fortress/install_ubuntu_src.

some warnings come up though, but i guess that we can just ignore for now.


colcon build --merge-install --parallel-workers 4
--- stderr: ignition-physics5

/root/docker_ws/ignition_ws/src/ign-physics/tpe/lib/src/Shape.cc: In copy constructor ‘ignition::physics::tpelib::CapsuleShape::CapsuleShape(const ignition::physics::tpelib::CapsuleShape&)’:
/root/docker_ws/ignition_ws/src/ign-physics/tpe/lib/src/Shape.cc:98:11: warning: implicitly-declared ‘ignition::physics::tpelib::CapsuleShape& ignition::physics::tpelib::CapsuleShape::operator=(const ignition::physics::tpelib::CapsuleShape&)’ is deprecated [-Wdeprecated-copy]
98 | *this = _other;
| ^~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/tpe/lib/src/Shape.cc:95:1: note: because ‘ignition::physics::tpelib::CapsuleShape’ has user-provided ‘ignition::physics::tpelib::CapsuleShape::CapsuleShape(const ignition::physics::tpelib::CapsuleShape&)’
95 | CapsuleShape::CapsuleShape(const CapsuleShape &_other)
| ^~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/tpe/lib/src/Shape.cc: In copy constructor ‘ignition::physics::tpelib::EllipsoidShape::EllipsoidShape(const ignition::physics::tpelib::EllipsoidShape&)’:
/root/docker_ws/ignition_ws/src/ign-physics/tpe/lib/src/Shape.cc:201:11: warning: implicitly-declared ‘ignition::physics::tpelib::EllipsoidShape& ignition::physics::tpelib::EllipsoidShape::operator=(const ignition::physics::tpelib::EllipsoidShape&)’ is deprecated [-Wdeprecated-copy]
201 | *this = _other;
| ^~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/tpe/lib/src/Shape.cc:198:1: note: because ‘ignition::physics::tpelib::EllipsoidShape’ has user-provided ‘ignition::physics::tpelib::EllipsoidShape::EllipsoidShape(const ignition::physics::tpelib::EllipsoidShape&)’
198 | EllipsoidShape::EllipsoidShape(const EllipsoidShape &_other)
| ^~~~~~~~~~~~~~
In file included from /root/docker_ws/ignition_ws/src/ign-physics/src/utils/TestDataTypes.hh:24,
from /root/docker_ws/ignition_ws/src/ign-physics/src/SpecifyData_TEST.cc:22:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/SpecifyData.hh: In member function ‘ignition::physics::RequireData& ignition::physics::RequireData::operator=(const ignition::physics::RequireData&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/SpecifyData.hh:173:11: warning: implicitly-declared ‘ignition::physics::ExpectData& ignition::physics::ExpectData::operator=(const ignition::physics::ExpectData&)’ is deprecated [-Wdeprecated-copy]
173 | class RequireData : public virtual ExpectData
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/SpecifyData.hh:357,
from /root/docker_ws/ignition_ws/src/ign-physics/src/utils/TestDataTypes.hh:24,
from /root/docker_ws/ignition_ws/src/ign-physics/src/SpecifyData_TEST.cc:22:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:44:5: note: because ‘ignition::physics::ExpectData’ has user-provided ‘ignition::physics::ExpectData::ExpectData(const ignition::physics::ExpectData&) [with Expected = StringData]’
44 | ExpectData::ExpectData(const ExpectData &)
| ^~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh: In member function ‘ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >& ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >::operator=(const ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:321:11: note: synthesized method ‘ignition::physics::RequireData& ignition::physics::RequireData::operator=(const ignition::physics::RequireData&)’ first required here
321 | class SpecifyData :
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/docker_ws/ignition_ws/src/ign-physics/src/utils/TestDataTypes.hh:24,
from /root/docker_ws/ignition_ws/src/ign-physics/src/SpecifyData_TEST.cc:22:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/SpecifyData.hh: In member function ‘ignition::physics::RequireData& ignition::physics::RequireData::operator=(const ignition::physics::RequireData&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/SpecifyData.hh:173:11: warning: implicitly-declared ‘ignition::physics::ExpectData& ignition::physics::ExpectData::operator=(const ignition::physics::ExpectData&)’ is deprecated [-Wdeprecated-copy]
173 | class RequireData : public virtual ExpectData
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/SpecifyData.hh:357,
from /root/docker_ws/ignition_ws/src/ign-physics/src/utils/TestDataTypes.hh:24,
from /root/docker_ws/ignition_ws/src/ign-physics/src/SpecifyData_TEST.cc:22:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:44:5: note: because ‘ignition::physics::ExpectData’ has user-provided ‘ignition::physics::ExpectData::ExpectData(const ignition::physics::ExpectData&) [with Expected = BoolData]’
44 | ExpectData::ExpectData(const ExpectData &)
| ^~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh: In member function ‘ignition::physics::SpecifyData
ignition::physics::RequireData, ignition::physics::RequireData >& ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >::operator=(const ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:321:11: note: synthesized method ‘ignition::physics::RequireData& ignition::physics::RequireData::operator=(const ignition::physics::RequireData&)’ first required here
321 | class SpecifyData :
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/docker_ws/ignition_ws/src/ign-physics/src/utils/TestDataTypes.hh:24,
from /root/docker_ws/ignition_ws/src/ign-physics/src/SpecifyData_TEST.cc:22:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/SpecifyData.hh: In member function ‘ignition::physics::RequireData& ignition::physics::RequireData::operator=(const ignition::physics::RequireData&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/SpecifyData.hh:173:11: warning: implicitly-declared ‘ignition::physics::ExpectData& ignition::physics::ExpectData::operator=(const ignition::physics::ExpectData&)’ is deprecated [-Wdeprecated-copy]
173 | class RequireData : public virtual ExpectData
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/SpecifyData.hh:357,
from /root/docker_ws/ignition_ws/src/ign-physics/src/utils/TestDataTypes.hh:24,
from /root/docker_ws/ignition_ws/src/ign-physics/src/SpecifyData_TEST.cc:22:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:44:5: note: because ‘ignition::physics::ExpectData’ has user-provided ‘ignition::physics::ExpectData::ExpectData(const ignition::physics::ExpectData&) [with Expected = CharData]’
44 | ExpectData::ExpectData(const ExpectData &)
| ^~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh: In member function ‘ignition::physics::SpecifyData
ignition::physics::RequireData, ignition::physics::RequireData >& ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >::operator=(const ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:321:11: note: synthesized method ‘ignition::physics::RequireData& ignition::physics::RequireData::operator=(const ignition::physics::RequireData&)’ first required here
321 | class SpecifyData :
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh: In member function ‘ignition::physics::RequireData& ignition::physics::RequireData::operator=(const ignition::physics::RequireData&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:435:11: note: synthesized method ‘ignition::physics::SpecifyData
ignition::physics::RequireData, ignition::physics::RequireData >& ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >::operator=(const ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >&)’ first required here
435 | class RequireData
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh: In member function ‘ignition::physics::SpecifyData
ignition::physics::RequireData, ignition::physics::RequireData >& ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >::operator=(const ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:321:11: note: synthesized method ‘ignition::physics::RequireData& ignition::physics::RequireData::operator=(const ignition::physics::RequireData&)’ first required here
321 | class SpecifyData :
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh: In member function ‘ignition::physics::RequireData& ignition::physics::RequireData::operator=(const ignition::physics::RequireData&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:435:11: note: synthesized method ‘ignition::physics::SpecifyData
ignition::physics::RequireData, ignition::physics::RequireData >& ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >::operator=(const ignition::physics::SpecifyDataignition::physics::RequireData, ignition::physics::RequireData >&)’ first required here
435 | class RequireData
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh: In member function ‘ignition::physics::SpecifyData, ignition::physics::ExpectData >& ignition::physics::SpecifyData, ignition::physics::ExpectData >::operator=(const ignition::physics::SpecifyData, ignition::physics::ExpectData >&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:321:11: note: synthesized method ‘ignition::physics::RequireData& ignition::physics::RequireData::operator=(const ignition::physics::RequireData&)’ first required here
321 | class SpecifyData :
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh: In member function ‘ignition::physics::SpecifyData
ignition::physics::ExpectData, ignition::physics::ExpectData >& ignition::physics::SpecifyDataignition::physics::ExpectData, ignition::physics::ExpectData >::operator=(const ignition::physics::SpecifyDataignition::physics::ExpectData, ignition::physics::ExpectData >&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:321:11: warning: implicitly-declared ‘ignition::physics::ExpectData& ignition::physics::ExpectData::operator=(const ignition::physics::ExpectData&)’ is deprecated [-Wdeprecated-copy]
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:44:5: note: because ‘ignition::physics::ExpectData’ has user-provided ‘ignition::physics::ExpectData::ExpectData(const ignition::physics::ExpectData&) [with Expected = IntData]’
44 | ExpectData::ExpectData(const ExpectData &)
| ^~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:321:11: warning: implicitly-declared ‘ignition::physics::ExpectData& ignition::physics::ExpectData::operator=(const ignition::physics::ExpectData&)’ is deprecated [-Wdeprecated-copy]
321 | class SpecifyData :
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:44:5: note: because ‘ignition::physics::ExpectData’ has user-provided ‘ignition::physics::ExpectData::ExpectData(const ignition::physics::ExpectData&) [with Expected = FloatData]’
44 | ExpectData::ExpectData(const ExpectData &)
| ^~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh: In member function ‘ignition::physics::ExpectData& ignition::physics::ExpectData::operator=(const ignition::physics::ExpectData&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:424:11: note: synthesized method ‘ignition::physics::SpecifyData
ignition::physics::ExpectData, ignition::physics::ExpectData >& ignition::physics::SpecifyDataignition::physics::ExpectData, ignition::physics::ExpectData >::operator=(const ignition::physics::SpecifyDataignition::physics::ExpectData, ignition::physics::ExpectData >&)’ first required here
424 | class ExpectData
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh: In member function ‘ignition::physics::SpecifyData, ignition::physics::ExpectData >& ignition::physics::SpecifyData, ignition::physics::ExpectData >::operator=(const ignition::physics::SpecifyData, ignition::physics::ExpectData >&)’:
/root/docker_ws/ignition_ws/src/ign-physics/include/ignition/physics/detail/SpecifyData.hh:321:11: note: synthesized method ‘ignition::physics::ExpectData& ignition::physics::ExpectData::operator=(const ignition::physics::ExpectData&)’ first required here
321 | class SpecifyData :
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/docker_ws/ignition_ws/src/ign-physics/src/SpecifyData_TEST.cc: In member function ‘virtual void SpecifyData_Copy_Test::TestBody()’:
/root/docker_ws/ignition_ws/src/ign-physics/src/SpecifyData_TEST.cc:683:16: note: synthesized method ‘ignition::physics::SpecifyData, ignition::physics::ExpectData >& ignition::physics::SpecifyData, ignition::physics::ExpectData >::operator=(const ignition::physics::SpecifyData, ignition::physics::ExpectData >&)’ first required here
683 | opEqData = data;
| ^~~~

then start sample world.

ign gazebo shapes.sdf -v 4

ignition_gazebo_via_container.png

What's next

probably try some examples from ros_ign to comprehend how it works.

Reference

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
0
Help us understand the problem. What are the problem?