gazebo-classic
gazebo-classic copied to clipboard
libModelPropShop.so gives Invalid vector supplied as parameter
I ran into this bug when trying to run gzweb. I can't create the thumbnails.
Steps to reproduce:
- install gazebo11 on Ubuntu 20.04 using the repos. Here is a docker file I made:
FROM ubuntu:20.04 RUN apt-get update && apt-get -y install \ gnupg \ gnupg2 \ lsb-release \ wget \ && echo deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main > /etc/apt/sources.list.d/gazebo-stable.list \ && wget https://packages.osrfoundation.org/gazebo.key -O - | apt-key add - RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \ ant \ binutils \ bc \ dirmngr \ gazebo11 \ gstreamer1.0-plugins-bad \ gstreamer1.0-plugins-base \ gstreamer1.0-plugins-good \ gstreamer1.0-plugins-ugly \ libeigen3-dev \ libgazebo11-dev \ libgstreamer-plugins-base1.0-dev \ libimage-exiftool-perl \ libopencv-dev \ libxml2-utils \ mesa-utils \ protobuf-compiler \ x-window-system \ ignition-edifice # you might not want to keep this last line COPY ./gazebo_models /gazebo_models
- get a gazebo model. I used the bowl from gazebo_models.git, but feel free to use something else. It seems like any model will re-create the bug.
- run
gzserver
with thelibModelPropShop
plugin. Here is what I did: Run the docker image from step 1:
but you'll need to replacexhost + docker run -it --rm --privileged --env=LOCAL_USER_ID="$(id -u)" -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=$DISPLAY 66a1b0409a2f /bin/bash
66a1b0409a2f
with the container ID from step 1. Next, in the container, rungzserver
withlibModelPropShop
, here's what I did:source /usr/share/gazebo-11/setup.sh export GAZEBO_MODEL_DATABASE_URI="" mkdir /tmp/gz-thumb gzserver -s libModelPropShop.so /usr/share/gazebo-11/worlds/empty.world --propshop-save /tmp/gz-thumb --propshop-model /gazebo_models/bowl/model.sdf
Buggy behavior
When I do the above steps, here is the output from gzserver
:
gzserver: /build/ogre-1.9-kiU5_5/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreNode.cpp:405: virtual void Ogre::Node::setPosition(const Ogre::Vector3&): Assertion `!pos.isNaN() && "Invalid vector supplied as parameter"' failed.
Aborted (core dumped)
The thumbnail images are not created.
Expected behavior
When I built gazebo from source (in docker) the bug was gone. gzserver
ran fine and the thumbnails were created. I used commit: b502f17729302fa0da8e2a00ffbd69112bb7e6aa (as of this evening this commit was tagged with gazebo11_11.8.0)
As a side note, I noticed that gazebo seems to run faster in the version I built from source. If it's helpful, I can post the docker file I used to build gazebo... but it's somewhat long.