Gazebo | Ignition | Community
Ask Your Question

dhood's profile - activity

2018-02-28 13:22:29 -0500 commented answer Examples of registering a custom sensor (not plugin)

thanks for replying! I ended up using a different approach to avoid needing to register a sensor but hopefully this is u

2018-02-23 13:34:29 -0500 answered a question Gazebo7 hangs with black screen while "Preparing your world"

There's a bug that is affecting projects that customise the Gazebo world name in the SDF. Relevant issue-tracker links

2017-06-13 04:44:34 -0500 received badge  Good Question (source)
2017-04-27 15:59:18 -0500 received badge  Famous Question (source)
2016-12-01 10:29:03 -0500 commented question Examples of registering a custom sensor (not plugin)

@javi-v I didn't, no. I made use of an existing sensor instead. (In this case, to get a parallel ray sensor I used a RaySensor with an origin "behind" the origin of the link, so that the rays are approximately parallel in the region "in front" of the link: https://bitbucket.org/osrf/ariac/src/6e6eebc181bed1eef147581b1604bbec3374f45d/osrf_gear/models/proximity_sensor/model.sdf?at=master&fileviewer=file-view-default#model.sdf-37 )

2016-12-01 04:54:38 -0500 received badge  Nice Question (source)
2016-08-27 20:48:02 -0500 received badge  Famous Question (source)
2016-08-27 20:48:02 -0500 received badge  Notable Question (source)
2016-08-27 20:48:02 -0500 received badge  Popular Question (source)
2016-07-26 16:12:54 -0500 received badge  Notable Question (source)
2016-07-26 16:12:54 -0500 received badge  Popular Question (source)
2016-07-25 20:37:00 -0500 received badge  Editor (source)
2016-07-25 20:36:31 -0500 answered a question How to delete a model with an world plugin

If anyone else comes across this post, you can also do this through a WorldPtr with World::RemoveModel (API link)

2016-07-21 12:55:54 -0500 received badge  Student (source)
2016-07-21 12:45:05 -0500 asked a question Examples of registering a custom sensor (not plugin)

I'm trying to make a custom sensor (that inherits from RaySensor) but am having trouble getting it registered properly if it's not built within the gazebo source code.

I call:

GZ_REGISTER_STATIC_SENSOR("parallel_ray", ParallelRaySensor)

but when I try to add a model with that sensor, I end up with:

[Err] [SensorManager.cc:276] Unable to create sensor of type[parallel_ray]

because sensors::SensorFactory::GetSensorTypes() doesn't list parallel_ray as a type.

Can anyone share a link to some code where a custom sensor, from outside of the gazebo source code, has been registered with gazebo's SensorManager/SensorFactory? I suspect that I need to specify the path to the sensor's .so somehow.

2016-07-18 13:02:25 -0500 asked a question How to modify a link's visual programmatically from a sensor plugin?

I'm trying to modify the visual of a link from inside a sensor plugin (not a visual plugin).

I get access to the link with:

physics::LinkPtr link = boost::dynamic_pointer_cast<physics::Link>(this->world->GetEntity(linkName));

Eventually I'd like to use gazebo::rendering::Visual::SetRotation, but I can't figure out how to get to that point.


I have tried using:

msgs::Visual visual = link->GetVisualMessage("visual");

to get access to the visual, but after that I have not had any luck converting the gazebo::msgs::Visual to a gazebo::rendering::Visual.


Any tips for how to get access to a gazebo::rendering::Visual visual from a gazebo::physics::LinkPtr?