Quantcast
Channel: Gazebo: Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 7017

How to properly use get_sensor?

$
0
0
Hi, I have some code which uses get_sensor to get a laser sensor, however when I want to use two of this model, they get muddled up as I can't reference the full model name. sensors::SensorPtr model_sensor; model_sensor = sensors::get_sensor("laser"); // this is fine when there's only one laser sensor I want to get something like: model_sensor = sensors::get_sensor("my_model::hoyoko::link::laser"); but I'm confident this is wrong as gazebo crashes with this new code. I have the get_sensor refference : http://osrf-distributions.s3.amazonaws.com/gazebo/api/1.4.0/group__gazebo__sensors.html (Ctrl f "get_sensor" to find the relevant part) But I don't fully understand what they mean by " This name should be fully scoped. This means _name = world_name::model_name::link_name::sensor_name." Any help would be much appreciated, thanks!

Viewing all articles
Browse latest Browse all 7017

Trending Articles