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

run error #36

Closed
Archiewyq opened this issue Jun 6, 2018 · 10 comments
Closed

run error #36

Archiewyq opened this issue Jun 6, 2018 · 10 comments

Comments

@Archiewyq
Copy link

when i run 'sudo ./run_demo.bash', it shows me the error:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[Err] [RenderEngine.cc:740] Unable to create glx visual
[Wrn] [RenderEngine.cc:93] Unable to create X window. Rendering will be disabled
[Wrn] [RenderEngine.cc:293] Cannot initialize render engine since render path type is NONE. Ignore this warning ifrendering has been turned off on purpose.
@RyodoTanaka
Copy link

I met the same error, with the same commands.

$ ./run_demo.bash

And the log shows

[ INFO] [1528357238.485766562]: Finished loading Gazebo ROS API Plugin.
[Msg] Waiting for master.
[ INFO] [1528357238.486323940]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 172.17.0.2
process[gazebo_gui-3]: started with pid [128]
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[Err] [RenderEngine.cc:740] Unable to create glx visual
[Wrn] [RenderEngine.cc:93] Unable to create X window. Rendering will be disabled
[Wrn] [RenderEngine.cc:293] Cannot initialize render engine since render path type is NONE. Ignore this warning ifrendering has been turned off on purpose.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
process[robot_state_publisher-4]: started with pid [201]
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
process[fake_localization-5]: started with pid [259]
process[very_inaccurate_odom-6]: started with pid [351]
Segmentation fault (core dumped)
[gazebo_gui-3] process has died [pid 128, exit code 139, cmd /opt/ros/kinetic/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/root/.ros/log/119c1824-6a26-11e8-bcfc-0242ac110002/gazebo_gui-3.log].
log file: /root/.ros/log/119c1824-6a26-11e8-bcfc-0242ac110002/gazebo_gui-3*.log
process[joystick_translator-7]: started with pid [410]
[ INFO] [1528357239.624087650, 1341.729000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1528357239.658170199, 1341.755000000]: Physics dynamic reconfigure ready.
process[joy_node0-8]: started with pid [422]
[ERROR] [1528357239.844060646]: Couldn't open joystick /dev/input/js0. Will retry every second.
process[joy_node1-9]: started with pid [484]
[ERROR] [1528357240.114519197]: Couldn't open joystick /dev/input/js1. Will retry every second.
process[spawn_urdf-10]: started with pid [527]
process[rviz-11]: started with pid [557]
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Could not initialize OpenGL for RasterGLSurface, reverting to RasterSurface.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
================================================================================REQUIRED process [rviz-11] has died!
process has died [pid 557, exit code -11, cmd /opt/ros/kinetic/lib/rviz/rviz -d /tmp/workspace/src/car_demo/rviz/demo.rviz __name:=rviz __log:=/root/.ros/log/119c1824-6a26-11e8-bcfc-0242ac110002/rviz-11.log].
log file: /root/.ros/log/119c1824-6a26-11e8-bcfc-0242ac110002/rviz-11*.log
Initiating shutdown!
================================================================================
[rviz-11] killing on exit
[spawn_urdf-10] killing on exit
[joy_node1-9] killing on exit
[joy_node0-8] killing on exit
[joystick_translator-7] killing on exit
[very_inaccurate_odom-6] killing on exit
[fake_localization-5] killing on exit
[robot_state_publisher-4] killing on exit
[gazebo-2] killing on exit
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 313, in <module>
    sm.callSpawnService()
  File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 271, in callSpawnService
    initial_pose, self.reference_frame, self.gazebo_namespace)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/gazebo_ros/gazebo_interface.py", line 32, in spawn_urdf_model_client
    resp = spawn_urdf_model(model_name, model_xml, robot_namespace, initial_pose, reference_frame)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 435, in __call__
    return self.call(*args, **kwds)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 523, in call
    raise rospy.exceptions.ROSInterruptException("node shutdown interrupted service call")
rospy.exceptions.ROSInterruptException: node shutdown interrupted service call
[gazebo-2] escalating to SIGTERM
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

What should I do ?
Thanks forward.

@RyodoTanaka
Copy link

RyodoTanaka commented Jun 7, 2018

Now, I fixed this error.
I installed nvidia-docker2 by official tutorial written on here.
But, after I searched based on the error message, and found the important comment, that is
ROS docker image DOES NOT WORK WITH nvidia-docker2
that is written on here

Therefore, I removed docker-nvidia2 with apt remove --purge command.
And installed nvidia-docker by apt install command.
After adding nvidia-docker package, I also installed nvidia-modprobe package by apt command.
And before running ./run_demo.bash script, I did
sudo service nvidia-docker start
that is wirretn on here.

After all of that, I succeed to launch ./run_demo.bash script (every programs works correctly including Gazebo & Rviz).

@pirobot
Copy link

pirobot commented Jul 28, 2018

Thank you @RyodoTanaka. Your instructions also worked for me.

@endland
Copy link

endland commented Sep 21, 2018

Two thumbs up.. I had a same problem and solve it thanks to you
sudo apt remove --purge nvidia-docker2
sudo apt install nvidia-docker
sudo apt install nvidia-modprobe
sudo ./build_demo.bash
sudo ./run_demo.bash

It works. Gazebo popped up successfully.
By the way, I have a question. Why Rviz still suspend in initializing... any other action is needed ??

@BlueNoise
Copy link

BlueNoise commented Nov 10, 2018

I followed steps presented in this post, but I still have some errors at run time. Here is the output of the console:


**$ ./run_demo.bash** 
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
... logging to /root/.ros/log/2871ba40-e47e-11e8-aed2-0242ac110002/roslaunch-938bf5281b70-77.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://938bf5281b70:43517/

SUMMARY
========

PARAMETERS
 * /joy_node0/dev: /dev/input/js0
 * /joy_node1/dev: /dev/input/js1
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.13
 * /use_sim_time: True

NODES
  /
    fake_localization (fake_localization/fake_localization)
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    joy_node0 (joy/joy_node)
    joy_node1 (joy/joy_node)
    joystick_translator (car_demo/joystick_translator)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    rviz (rviz/rviz)
    spawn_urdf (gazebo_ros/spawn_model)
    very_inaccurate_odom (tf2_ros/static_transform_publisher)

auto-starting new master
process[master]: started with pid [87]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 2871ba40-e47e-11e8-aed2-0242ac110002
process[rosout-1]: started with pid [100]
started core service [/rosout]
process[gazebo-2]: started with pid [108]
Gazebo multi-robot simulator, version 8.6.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

process[gazebo_gui-3]: started with pid [127]
[ INFO] [1541809114.852730546]: Finished loading Gazebo ROS API Plugin.
[Msg] Waiting for master.
[ INFO] [1541809114.857392371]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 172.17.0.2
process[robot_state_publisher-4]: started with pid [172]
Gazebo multi-robot simulator, version 8.6.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Wrn] [GuiIface.cc:196] g/gui-plugin is really loading a SystemPlugin. To load a GUI plugin please use --gui-client-plugin 
[ INFO] [1541809115.284683179]: Finished loading Gazebo ROS API Plugin.
[Msg] Waiting for master.
[ INFO] [1541809115.287482928]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 172.17.0.2
[Wrn] [GuiIface.cc:294] Couldn't locate specified .ini. Creating file at "/root/.gazebo/gui.ini"
process[fake_localization-5]: started with pid [230]
[fake_localization-5] process has died [pid 230, exit code -11, cmd /opt/ros/kinetic/lib/fake_localization/fake_localization __name:=fake_localization __log:=/root/.ros/log/2871ba40-e47e-11e8-aed2-0242ac110002/fake_localization-5.log].
log file: /root/.ros/log/2871ba40-e47e-11e8-aed2-0242ac110002/fake_localization-5*.log
process[very_inaccurate_odom-6]: started with pid [295]
process[joystick_translator-7]: started with pid [340]
process[joy_node0-8]: started with pid [353]
process[joy_node1-9]: started with pid [358]
[joy_node0-8] process has died [pid 353, exit code -11, cmd /opt/ros/kinetic/lib/joy/joy_node __name:=joy_node0 __log:=/root/.ros/log/2871ba40-e47e-11e8-aed2-0242ac110002/joy_node0-8.log].
log file: /root/.ros/log/2871ba40-e47e-11e8-aed2-0242ac110002/joy_node0-8*.log
[ERROR] [1541809116.607578524]: Couldn't open joystick /dev/input/js1. Will retry every second.
process[spawn_urdf-10]: started with pid [403]
process[rviz-11]: started with pid [437]
[joy_node1-9] process has died [pid 358, exit code -11, cmd /opt/ros/kinetic/lib/joy/joy_node __name:=joy_node1 __log:=/root/.ros/log/2871ba40-e47e-11e8-aed2-0242ac110002/joy_node1-9.log].
log file: /root/.ros/log/2871ba40-e47e-11e8-aed2-0242ac110002/joy_node1-9*.log
Segmentation fault (core dumped)
[gazebo-2] process has died [pid 108, exit code 139, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver --verbose -e ode /tmp/workspace/src/car_demo/worlds/mcity.world __name:=gazebo __log:=/root/.ros/log/2871ba40-e47e-11e8-aed2-0242ac110002/gazebo-2.log].
log file: /root/.ros/log/2871ba40-e47e-11e8-aed2-0242ac110002/gazebo-2*.log
[Err] [TransportIface.cc:396] Unable to connect to master.
[Err] [GLWidget.cc:880] Unable to connect to a running Gazebo master.
[spawn_urdf-10] process has finished cleanly
log file: /root/.ros/log/2871ba40-e47e-11e8-aed2-0242ac110002/spawn_urdf-10*.log
[Wrn] [Publisher.cc:141] Queue limit reached for topic /gazebo/default/user_camera/pose, deleting message. This warning is printed only once.
^C[rviz-11] killing on exit
[robot_state_publisher-4] killing on exit
[very_inaccurate_odom-6] killing on exit
[joystick_translator-7] killing on exit
[gazebo_gui-3] killing on exit
[rviz-11] escalating to SIGTERM
[gazebo_gui-3] escalating to SIGTERM
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Any ideas?

@RyodoTanaka
Copy link

RyodoTanaka commented Nov 14, 2018

@endland @BlueNoise
We found the solution !!!!!
Because of the old version of ROS in osrf/car_demo's docker image, it does not work.
To avoid the errors, you need to add & write dist-upgrade on the Dockerfile.
To say details... you should rewrite your Dockerfile as following...!

FROM osrf/ros:kinetic-desktop

LABEL com.nvidia.volumes.needed="nvidia_driver"
ENV PATH /usr/local/nvidia/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}

RUN apt-get update \
 && apt-get dist-upgrade -y \
 && apt-get install -y \
    wget \
    lsb-release \
    sudo \
    mesa-utils \
 && apt-get clean


# Get gazebo binaries
RUN echo "deb http://packages.osrfoundation.org/gazebo/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list \
 && wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add - \
 && apt-get update \
 && apt-get install -y \
    gazebo8 \
    ros-kinetic-gazebo8-ros-pkgs \
    ros-kinetic-fake-localization \
    ros-kinetic-joy \
 && apt-get clean


RUN mkdir -p /tmp/workspace/src
COPY prius_description /tmp/workspace/src/prius_description
COPY prius_msgs /tmp/workspace/src/prius_msgs
COPY car_demo /tmp/workspace/src/car_demo
RUN /bin/bash -c 'cd /tmp/workspace \
 && source /opt/ros/kinetic/setup.bash \
 && catkin_make'


CMD ["/bin/bash", "-c", "source /opt/ros/kinetic/setup.bash && source /tmp/workspace/devel/setup.bash && roslaunch car_demo demo.launch"]

I hope it will help you.
Best,

@BlueNoise
Copy link

BlueNoise commented Nov 18, 2018

@RyodoTanaka Thank you for your reply. Somebody on our team figured the docker problem also. He made a fork of this repo to be compatible with docker 2. Might be useful for other people too.
https://github.com/jbrookshire/car_demo

@RyodoTanaka
Copy link

RyodoTanaka commented Nov 19, 2018

@BlueNoise
Thank you for telling us about your project !
https://github.com/jbrookshire/car_demo

We also working to utilize this osrf/car_demo simulator for testing with Autoware.
I also already forked this repository (https://github.com/RyodoTanaka/car_demo/tree/feature/car_demo_interface), and modified them to run roscore on the local machine and run the simulator on docker.
So, something is different to setup the docker and the local machine, but anyway, if you have an interest on that, be free to tell me !
https://github.com/RyodoTanaka/car_demo/wiki

@visinescu13
Copy link

Hello. I have the same problem. I tried all the above methods with both ROS Kinetic and Melodic. I have these errors. Please let me know if there's a solution to this problem.

@tfoote
Copy link
Contributor

tfoote commented Apr 11, 2019

@visinescu13 it looks like you need the x11 options added in #60 This also looks like the same or similar issue for the original poster. Without anything more concrete to work on I'm going to close this.

@tfoote tfoote closed this as completed Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants