Gazebo | Ignition | Community
Ask Your Question
0

Does the marker example work with Gazebo 8?

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

tve gravatar image

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

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.
http://gazebosim.org

[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.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.0.46
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.0.46
[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.
^C
>

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
/introspection/mfznxa/items_update
> ign service -l
/introspection/mfznxa/filter_new
/introspection/mfznxa/filter_remove
/introspection/mfznxa/filter_update
/introspection/mfznxa/items
/physics/info/plugin
> gz marker
Error: /marker service not present on network.
> gz topic -l
/gazebo/ocean_waves/atmosphere
/gazebo/ocean_waves/box/hull/wrench
/gazebo/ocean_waves/diagnostics
/gazebo/ocean_waves/factory
/gazebo/ocean_waves/factory/light
/gazebo/ocean_waves/gui
/gazebo/ocean_waves/gzclient_camera/cmd
/gazebo/ocean_waves/joint
/gazebo/ocean_waves/light/modify
/gazebo/ocean_waves/log/control
/gazebo/ocean_waves/log/status
/gazebo/ocean_waves/model/info
/gazebo/ocean_waves/model/modify
/gazebo/ocean_waves/physics
/gazebo/ocean_waves/physics/contacts
/gazebo/ocean_waves/playback_control
/gazebo/ocean_waves/pose/info
/gazebo/ocean_waves/pose/local/info
/gazebo/ocean_waves/pose/modify
/gazebo/ocean_waves/request
/gazebo/ocean_waves/response
/gazebo/ocean_waves/roads
/gazebo/ocean_waves/scene
/gazebo/ocean_waves/selection
/gazebo/ocean_waves/sensor
/gazebo/ocean_waves/skeleton_pose/info
/gazebo/ocean_waves/sky
/gazebo/ocean_waves/undo_redo
/gazebo/ocean_waves/user_camera/joy_pose
/gazebo/ocean_waves/user_camera/joy_twist
/gazebo/ocean_waves/user_camera/pose
/gazebo/ocean_waves/user_cmd
/gazebo/ocean_waves/user_cmd_stats
/gazebo/ocean_waves/visual
/gazebo ...
(more)
edit retag flag offensive close merge delete

Comments

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 -0600 )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 -0600 )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 -0600 )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 -0600 )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 -0600 )edit

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

tve gravatar imagetve ( 2017-09-11 11:32:43 -0600 )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 -0600 )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 -0600 )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 -0600 )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 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

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

tve gravatar image

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

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://192.168.0.46:39002] for pub/sub
Bind at: [tcp://192.168.0.46:40787] for control
Bind at: [tcp://192.168.0.46:49928] for srv. calls

(192.168.0.46 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
Publisher:
    Topic: [@/h:tve@/introspection/mfznxa/filter_new]
    Address: tcp://192.168.0.3:40238
    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://192.168.0.3:40238] for service requests

Note 192.168.0.3, 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

Question Tools

1 follower

Stats

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

Seen: 1,728 times

Last updated: Sep 12 '17