Couldn't run docker image
prihex opened this issue · 2 comments
I get the following error.
$ sudo docker build .
.
.
.
Successfully built 29a64680dfe7
$ sudo docker run 29a64680dfe7
.
.
.
Param node_id: inno.dynamics
terminate called after throwing an instance of 'std::runtime_error'
what(): Failed to add iface
================================================================================REQUIRED process [px4_uavcan_communicator-3] has died!
process has died [pid 113, exit code -6, cmd /catkin_ws/devel/lib/uavcan_communicator/uavcan_communicator __name:=px4_uavcan_communicator __log:=/root/.ros/log/b9f39b44-9332-11ec-89fc-0242ac110002/px4_uavcan_communicator-3.log].
log file: /root/.ros/log/b9f39b44-9332-11ec-89fc-0242ac110002/px4_uavcan_communicator-3*.log
Initiating shutdown!
================================================================================
RLException: cannot add process [innosim_relay_node-5] after process monitor has been shut down
The traceback for the exception was written to the log file
.
.
# it terminates
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
$
I can not see log file. .ros
directory doesn't exist in my /root
directory.
I do not know what I am missing.
OS: Ubuntu 18.04
ROS: melodic (I ve changed in ROS_DISTRO as melodic in docker file)
Did you connect a CAN-sniffer device to your PC when you run the container?
Typically, px4_uavcan_communicator fails with Failed to add iface
error when slcan is not created successfully. Since roslaunch run px4_uavcan_communicator node with required="true"
it leads to shootdown all nodes and the container as well (there is no sense to continue without this node). It may happen only when this device is not not found.
By the way, in readme it is said to run scripts/docker/run_hitl_inno_vtol.sh
instead of docker run
. This script before running a container initially call auxialliary get_sniffer_symlink.sh script to get the path to the device and then forward this path to the docker container with --privileged
.
We need to get this path before running a container instead of doing it inside because udevadm doesn't automatically start inside a container.
One more note. If you are using a different CAN-sniffer (not the one mentioned in readme) it may happen that it has different VID and PID, so the script above simply can't find your device. In this case you need to change these values or explicitly set DEV_PATH_SYMLINK
in the docker/config.sh and it should be ok.
I will make readme more clear based on your case.
I am trying to simulate in SITL mode