Robotics StackExchange | Archived questions

Robot with two instances of the same sensor

I'm trying to create a pioneer with two lasers (Hokuyo). I do have a pioneer with the two devices visible, but only one is active and I don't seem to be able to get the second one generate anything.

Is the only solution really to have a second model, say Hokuyo2 and include it?

Cheers,

Fred

Asked by flabrosse on 2017-03-27 10:36:09 UTC

Comments

Answers

The plane_demo.world which ships with Gazebo has 2 sensors (camera and camera_wide) on the same link. Both cameras are publishing distinct images, as you can check with the topic viewer.

Did you give the two sensors different names?

Asked by chapulina on 2017-03-27 10:54:25 UTC

Comments

Well, I included twice the hokuyo model with different poses and link names. From the example you sent I clearly have to create two laser sensors of type ray (I guess what I meant by creating a second hokuyo sensor). I'll play more. Thanks.

Asked by flabrosse on 2017-03-27 11:03:37 UTC

So in the end I did it by not including the hokuyo model but instead copying the relevant parts of it and pasting that twice in my robot model, with different names. That works, but does not appeal to my sense of reusing devices (like it is possible to do in player).

Asked by flabrosse on 2017-03-31 07:26:49 UTC

Comments