Gazebo | Ignition | Community
Ask Your Question

Gazebo crashes if a plugin parameter has an empty value

asked 2013-01-07 07:18:29 -0500

Johannes Meyer gravatar image

updated 2013-01-07 12:02:43 -0500

For our quadrotor simulation package hector_quadrotor we are using some custom Gazebo plugins with a couple of parameters. Most of them have a default value and as I would like to use xacro macro parameters for some of them I would like to support empty strings or empty tags in the plugin's SDF definitions.

However, the plugin causes a segfault in gzserver as the Element::GetValueString() access the empty pointer returned by Element::GetValue(). Is there a special reason why GetValueString() and the other type specific getter functions do not return an empty string or the default constructed values if the parameter value is empty? Of course a simple workaround to circumvent the segfault would be to check if GetValue() returns a null pointer before calling GetValueString().

See for an example use case. I am using Gazebo 1.0.2, the version that currently comes with ROS fuerte. But from the source code on BitBucket, the described behaviour should be the same for all versions up to 1.3.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-07 18:17:36 -0500

hsu gravatar image

updated 2013-01-07 18:23:10 -0500

filed a ticket.

Is it the case that Element::value is null in this line?

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2013-01-07 07:18:29 -0500

Seen: 245 times

Last updated: Jan 07 '13