Home | Tutorials | Wiki | Issues
Ask Your Question

Does the marker example work with Gazebo 8?

asked 2017-09-10 22:56:00 -0500

tve gravatar image

updated 2017-09-12 10:56:29 -0500

I have gazebo 8.1.1 and it's generally working, but I can't get markers to display. I tried the stand-alone marker example (https://bitbucket.org/osrf/gazebo/src...) and while it runs happily there's nothing to see in gzclient... Does this example actually work or is something missing?

Gazebo output:

> gazebo --verbose
Gazebo multi-robot simulator, version 9.0.1
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.

[Msg] Waiting for master.
Gazebo multi-robot simulator, version 9.0.1
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.

[Msg] Waiting for master.
[Msg] Connected to gazebo master @
[Msg] Publicized address:
[Msg] Connected to gazebo master @
[Msg] Publicized address:
[Err] [InsertModelWidget.cc:336] Missing model.config for model "/home/tve/src/gazebo-wave/marker-test"
[Err] [InsertModelWidget.cc:336] Missing model.config for model "/home/tve/src/gazebo-wave/media"
[Err] [InsertModelWidget.cc:336] Missing model.config for model "/home/tve/src/gazebo-wave/models"
[Err] [InsertModelWidget.cc:336] Missing model.config for model "/home/tve/src/gazebo-wave/plugins"
[Err] [InsertModelWidget.cc:336] Missing model.config for model "/home/tve/src/gazebo-wave/worlds"
[Wrn] [Publisher.cc:141] Queue limit reached for topic /gazebo/default/user_camera/pose, deleting message. This warning is printed only once.

All I see is the ground plane, grid, and the 3 axes.

Marker command output:

> ./marker
Spawning a sphere at the origin
Moving the sphere to x=0, y=0, z=1
Shrinking the sphere
Changing the sphere to red
Adding a green box
Change the green box to a cylinder
Adding a line between the sphere and cylinder
Adding a square around the origin
Adding 100 points inside the square
Adding HELLO at 0, 0, 2
Adding a semi-circular triangle fan
Adding two triangles using a triangle list
Adding a rectangular triangle strip
Delete all the markers

I ran some service & topic troubleshooting commands:

> ign topic -l
> ign service -l
> gz marker
Error: /marker service not present on network.
> gz topic -l
/gazebo ...
edit retag flag offensive close merge delete


I just tried it and it works for me. Does Gazebo print any errors if you run in verbose mode?

chapulina gravatar imagechapulina ( 2017-09-11 10:34:42 -0500 )edit

Rats, I was fearing that. I tried the precompiled 8.1.1 ubuntu binaries and I just installed gazebo from source. I'm adding the output to the original post 'cause comments are limited. The one odd thing in my set-up is that while I have ubuntu 16.04 I have to run kernel 3.8. I had to fix-up ign-transport not to try SO_REUSEPORT on the socket 'cause that got introduced in kernel 3.9. Sadly I can't run a newer kernel.

tve gravatar imagetve ( 2017-09-11 11:11:23 -0500 )edit

It looks like you're running Gazebo 9 (unreleased development version). I haven't checked whether it works there...

chapulina gravatar imagechapulina ( 2017-09-11 11:16:37 -0500 )edit

If you have any tips on how to troubleshoot this, that would be appreciated. (I first tried with the 8.1.1 binary install, but hit the SO_REUSEPORT issue, although everything else worked. I then compiled from source to make sure it didn't have to do with that issue and got the same results.)

tve gravatar imagetve ( 2017-09-11 11:17:02 -0500 )edit

When you start Gazebo and then do `ign service -l`, do you see `/marker` in the list?

chapulina gravatar imagechapulina ( 2017-09-11 11:28:42 -0500 )edit

It returns without printing anything. No list at all. That can't be good...

tve gravatar imagetve ( 2017-09-11 11:32:43 -0500 )edit

Mysterious... I'd expect at least some error about not initializing the MarkerManager or failing to advertise the service

chapulina gravatar imagechapulina ( 2017-09-11 11:52:19 -0500 )edit

Where can I log messages? It's not clear to me how the communication architecture works, e.g. who really subscribes where, etc. Are there #defines or printf's I can insert in various places to see what is happening / not happening? Some broad pointers into code would help....

tve gravatar imagetve ( 2017-09-11 20:24:37 -0500 )edit

Not sure I understand what you're asking for, are you talking about debugging Gazebo's source code?

chapulina gravatar imagechapulina ( 2017-09-11 20:39:14 -0500 )edit

I guess you could call it that way. Somehow the marker messages are not making it or getting ignored. I'd like to effectively trace through the gazebo (and I suppose ignition transport) code to see where they get lost...

tve gravatar imagetve ( 2017-09-11 21:32:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-09-12 10:04:00 -0500

tve gravatar image

updated 2017-09-12 10:54:25 -0500

The answer appears to be "yes, but markers require ignition transport, while most of the gzclient functionality requires gazebo transport, and ignition transport requires UDP multicast connectivity on the LAN, while gazebo transport can operate remotely via TCP and configured on the client using GAZEBO_MASTER_URI". Due to some iptable rules on my laptop where I run gzclient the UDP multicast was blocked. (And due to the fact that none of this seems documented and there are no troubleshooting instructions I could find it took me a long time the figure out.)

Some of the learnings:

Turn on ignition transport logging using setenv IGN_VERBOSE=1. When starting gzclient (assuming gzserver is running) if you just see something like

Bind at: [tcp://] for pub/sub
Bind at: [tcp://] for control
Bind at: [tcp://] for srv. calls

( is my local IP address) then you don't have connectivity. When you have connectivity you will also see several messages of the form:

Identity for receiving srv. requests: [859f5212-7654-4b27-a894-29d018cb96d8]
Identity for receiving srv. responses: [e2bbfaca-09d6-45ac-9f44-25ce4f4ffcf9]
Service call connection callback
    Topic: [@/h:tve@/introspection/mfznxa/filter_new]
    Address: tcp://
    Process UUID: d3be28e6-c608-4c4b-a941-47f63ac59e57
    Node UUID: 16b8e9a1-e288-4ad0-bf71-d1745a02653f
    Socket ID: e9efff25-e89b-4fb5-a657-523f51d28da4
    Request type: gazebo.msgs.Param_V
    Response type: gazebo.msgs.GzString
Advertise options:
    Scope: All
    * Connected to [tcp://] for service requests

Note, which is the machine gzserver runs on. So these messages show that the two machines can communicate at the ign transport level.

Now in addition you need to put them into the same ignition transport "partition". For this, setenv IGN_PARTITION=my-simulation (pick any value you like) on both machines. If you don't, they will discover each other but not register services and topics in the same partition and thus not really communicate. The partitions allow you to run multiple instances of gazebo on the same LAN.

At that point, running ign service -l (if you manage to install that...) should show /marker and /marker/list.

(Thanks chapulina for the troubleshooting help!)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-09-10 22:56:00 -0500

Seen: 44 times

Last updated: Sep 12