Gazebo | Ignition | Community
Ask Your Question
0

Problems extruding svg files in Gazebo

asked 2015-09-23 04:56:08 -0600

Adri gravatar image

updated 2015-09-25 02:02:16 -0600

Good day, Gazebo people.

I'm a Gazebo beginner. I started using Gazebo less than two weeks ago and I've been reading Gazebo's tutorials, but I don't understand this problem:

When I try to import a svg file that I created with Inkscape, a message appears:

Invalid file No paths found on file "/home/user/Desktop/my_chassis.svg" Please select another file.

I don't know why this message appears, because the 2D chassis I created and the 2D tutorial chassis are very similar. I don't know if I'm doing something wrong. Here is the simple 2D chassis I've created:

image description

Another problem I have is that I successfully import my 2D wheel, but the program goes crazy. Here is my 2D wheel

image description

and here is the Gazebo's extrude link window

image description

As you can see, it has no similitude with original picture. I clicked the Ok button, but this message about render engine OGRE appears:

Qt has caught an exception thrown from an event handler. Throwing exceptions from an event handler is not supported in Qt. You must reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'Ogre::InvalidParametersException' what(): OGRE EXCEPTION(2:InvalidParametersException): Object index out of bounds. in SceneNode::getAttachedObject at /build/buildd/ogre-1.8-1.8.1+dfsg/OgreMain/src/OgreSceneNode.cpp (line 160)

I hope you can help me with these problems. Thank you.

===================================================================================================

Good day.

Thank you, nkoening and hugomatic, for answering my questions. I finally get my chassis import, but I've got more problems:

  1. Gazebo doesn't recognize my chassis correctly. It shows this window:

    image description

  2. When I try to extrude the tutorial chassis, it generates an OGRE and a Qt exception and closes Gazebo automatically:

image description

Qt has caught an exception thrown from an event handler. Throwing exceptions from an event handler is not supported in Qt. You must reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'Ogre::InvalidParametersException' what(): OGRE EXCEPTION(2:InvalidParametersException): Object index out of bounds. in SceneNode::getAttachedObject at /build/buildd/ogre-1.8-1.8.1+dfsg/OgreMain/src/OgreSceneNode.cpp (line 160)

Thank you in advance.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-09-23 08:04:43 -0600

nkoenig gravatar image

Your chassis is most likely not an SVG path. In inkscape:

  1. Select the shape
  2. Go to the "Path" menu
  3. Select "Object to Path"
  4. Save and load into gazebo.

Your second question will be easier to debug if you can post the original SVG file.

edit flag offensive delete link more
2

answered 2015-09-23 13:52:39 -0600

hugomatic gravatar image

The SVG import only works on SVG paths. It also assumes that path sections don't cross each other. Paths don't have to be closed: a contour can be made of multiple paths.

Also, the importer does not support SVG transforms yet. If the string "transform" appears in your SVG file, try to remove it, tweak the image with the SVG editor, and save it again.

Attaching the SVG file is a good idea, because there are multiple ways to generate the same geometry with SVG.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2015-09-23 04:56:08 -0600

Seen: 1,140 times

Last updated: Sep 25 '15