Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gz topic not being published... #2399

Closed
Marco-63 opened this issue May 8, 2024 · 16 comments
Closed

gz topic not being published... #2399

Marco-63 opened this issue May 8, 2024 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@Marco-63
Copy link

Marco-63 commented May 8, 2024

Environment

  • OS Version: Ubuntu 22.04 running in a Oracle Virtual Box 7.0 hosted on Linux Mint
  • Source or binary build?
    Same behavior building from source or binary - latest Harmonic

Description

  • Expected behavior: Robot starts moving
  • Actual behavior: Absolutely nothing happens!

Steps to reproduce

  1. In a terminal run: gz sim -r building_robot.sdf
  2. In another terminal run: gz topic -t "/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}"
  3. Now you should have your robot moving in the simulation...!

Comment

  • Topic command never reaches the simulation world and therefore the robot doesn't start to move...
@Marco-63 Marco-63 added the bug Something isn't working label May 8, 2024
@azeey
Copy link
Contributor

azeey commented May 8, 2024

The topic /cmd_vel is configured by the system in your SDF file. Have you set it up properly? Assuming you were following the https://gazebosim.org/docs/harmonic/moving_robot tutorial, the final version of the SDF file is available here. Can you try with that?

@azeey azeey self-assigned this May 8, 2024
@Marco-63
Copy link
Author

Marco-63 commented May 9, 2024

Hi Azeey,
thank you for your reply!
I confirm that my SDF file is exactly the same as the one you linked and unfortunately, of course, the problem is the same as described above: the robot does not move...

This is the command I tried:
$ gz topic -t "/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}"

and this is the topic --info:

$ gz topic -t /cmd_vel --info
Publishers [Address, Message Type]:
  tcp://10.0.2.15:36663, gz.msgs.Twist
  tcp://10.0.2.15:36663, gz.msgs.Twist
  tcp://10.0.2.15:36663, gz.msgs.Twist
  tcp://10.0.2.15:36663, gz.msgs.Twist
Subscribers [Address, Message Type]:
  tcp://10.0.2.15:36663, gz.msgs.Twist

Pls. let me know what you need to see... thx!

@azeey
Copy link
Contributor

azeey commented May 9, 2024

It works for me:
Screen recording 2024-05-09 11.16.32.webm

Are you able to do gz topic -e -t /clock? You might have an issue with your firewall if that doesn't work.

@Marco-63
Copy link
Author

Marco-63 commented May 9, 2024

The clock topic reads fine... here is a sample:

system {
  sec: 1715272967
  nsec: 710552530
}
real {
  sec: 276
  nsec: 608780872
}
sim {
  sec: 172
  nsec: 966000000
}

My firewall says: "status: inactive" with "sudo ufw status"
Sorry, unfortunately only /cmd_vel doesn't seem to work...

Any other suggestions? thx!

@azeey
Copy link
Contributor

azeey commented May 9, 2024

Can you run the simulation with -v4 to see if there are any errors?

@Marco-63
Copy link
Author

Marco-63 commented May 9, 2024

Pls. take a look at this, lots of warnings but doesn't seem to be any errors...

$ gz sim -r -v4  building_robot.sdf 
[Dbg] [gz.cc:166] Subscribing to [/gazebo/starting_world].
[Msg] Gazebo Sim GUI    v8.3.0
[Dbg] [gz.cc:168] Waiting for a world to be set from the GUI...
[Dbg] [Gui.cc:263] Waiting for subscribers to [/gazebo/starting_world]...
[Msg] Received world [building_robot.sdf] from the GUI.
[Dbg] [gz.cc:172] Unsubscribing from [/gazebo/starting_world].
[Msg] Gazebo Sim Server v8.3.0
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[Msg] Loading SDF world file[/home/monti/Downloads/GazeboTutorial/building_robot.sdf].
[Msg] Serving entity system service on [/entity/system/add]
[Dbg] [Physics.cc:860] Loaded [gz::physics::dartsim::Plugin] from library [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-physics-7/engine-plugins/libgz-physics-dartsim-plugin.so]
[Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::Physics] for entity [1]
[Dbg] [Application.cc:96] Initializing application.
[Dbg] [Application.cc:170] Qt using OpenGL graphics interface
[GUI] [Dbg] [Application.cc:657] Create main window
[Msg] Create service on [/world/car_world/create]
[Msg] Remove service on [/world/car_world/remove]
[Msg] Pose service on [/world/car_world/set_pose]
[Msg] Pose service on [/world/car_world/set_pose_vector]
[Msg] Light configuration service on [/world/car_world/light_config]
[Msg] Physics service on [/world/car_world/set_physics]
[Msg] SphericalCoordinates service on [/world/car_world/set_spherical_coordinates]
[Msg] Enable collision service on [/world/car_world/enable_collision]
[Msg] Disable collision service on [/world/car_world/disable_collision]
[Msg] Material service on [/world/car_world/visual_config]
[Msg] Material service on [/world/car_world/wheel_slip]
[Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::UserCommands] for entity [1]
[Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::SceneBroadcaster] for entity [1]
[Dbg] [TriggeredPublisher.cc:689] TriggeredPublisher subscribed on /keyboard/keypress and publishing on /cmd_vel, 
[Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::TriggeredPublisher] for entity [1]
[Dbg] [TriggeredPublisher.cc:689] TriggeredPublisher subscribed on /keyboard/keypress and publishing on /cmd_vel, 
[Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::TriggeredPublisher] for entity [1]
[Dbg] [TriggeredPublisher.cc:689] TriggeredPublisher subscribed on /keyboard/keypress and publishing on /cmd_vel, 
[Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::TriggeredPublisher] for entity [1]
[Dbg] [TriggeredPublisher.cc:689] TriggeredPublisher subscribed on /keyboard/keypress and publishing on /cmd_vel, 
[Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::TriggeredPublisher] for entity [1]
[Msg] DiffDrive subscribing to twist messages on [cmd_vel]
[Dbg] [SystemManager.cc:74] Loaded system [gz::sim::systems::DiffDrive] for entity [8]
[Msg] Loaded level [3]
[Msg] Serving world controls on [/world/car_world/control], [/world/car_world/control/state] and [/world/car_world/playback/control]
[Msg] Serving GUI information on [/world/car_world/gui/info]
[Msg] World [car_world] initialized with [1ms] physics profile.
[Msg] Serving world SDF generation service on [/world/car_world/generate_world_sdf]
[Msg] Serving world names on [/gazebo/worlds]
[Msg] Resource path add service on [/gazebo/resource_paths/add].
[Msg] Resource path get service on [/gazebo/resource_paths/get].
[Msg] Resource path resolve service on [/gazebo/resource_paths/resolve].
[Msg] Resource paths published on [/gazebo/resource_paths].
[Msg] Server control service on [/server_control].
[GUI] [Dbg] [PathManager.cc:68] Requesting resource paths through [/gazebo/resource_paths/get]
[GUI] [Dbg] [Gui.cc:343] GUI requesting list of world names. The server may be busy downloading resources. Please be patient.
[GUI] [Dbg] [PathManager.cc:57] Received resource paths.
[GUI] [Dbg] [Gui.cc:401] Requesting GUI from [/world/car_world/gui/info]...
[GUI] [Dbg] [GuiRunner.cc:149] Requesting initial state from [/world/car_world/state]...
[GUI] [Msg] Loading config [/home/monti/.gz/sim/8/gui.config]
[GUI] [Dbg] [Application.cc:528] Loading plugin [MinimalScene]
[GUI] [Dbg] [MinimalScene.cc:802] Creating gz-rendering interface for OpenGL
[GUI] [Dbg] [MinimalScene.cc:802] Creating gz-rendering interface for OpenGL
[GUI] [Dbg] [MinimalScene.cc:986] Creating render thread interface for OpenGL
[GUI] [Dbg] [MinimalScene.cc:802] Creating gz-rendering interface for OpenGL
[GUI] [Dbg] [MinimalScene.cc:986] Creating render thread interface for OpenGL
[GUI] [Msg] Added plugin [3D View] to main window
[GUI] [Msg] Loaded plugin [MinimalScene] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-gui-8/plugins/libMinimalScene.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [EntityContextMenuPlugin]
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Msg] Added plugin [Entity Context Menu] to main window
[GUI] [Msg] Loaded plugin [EntityContextMenuPlugin] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-sim-8/plugins/gui/libEntityContextMenuPlugin.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [GzSceneManager]
[GUI] [Msg] Added plugin [Scene Manager] to main window
[GUI] [Msg] Loaded plugin [GzSceneManager] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-sim-8/plugins/gui/libGzSceneManager.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [InteractiveViewControl]
[GUI] [Msg] Camera view controller topic advertised on [/gui/camera/view_control]
[GUI] [Msg] Camera reference visual topic advertised on [/gui/camera/view_control/reference_visual]
[GUI] [Msg] Camera view control sensitivity advertised on [/gui/camera/view_control/sensitivity]
[GUI] [Msg] Added plugin [Interactive view control] to main window
[GUI] [Msg] Loaded plugin [InteractiveViewControl] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-gui-8/plugins/libInteractiveViewControl.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [CameraTracking]
[GUI] [Msg] Added plugin [Camera tracking] to main window
[GUI] [Msg] Loaded plugin [CameraTracking] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-gui-8/plugins/libCameraTracking.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [MarkerManager]
[GUI] [Msg] Listening to stats on [/world/car_world/stats]
[GUI] [Msg] Added plugin [Marker Manager] to main window
[GUI] [Msg] Loaded plugin [MarkerManager] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-gui-8/plugins/libMarkerManager.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [SelectEntities]
[GUI] [Msg] Added plugin [Select entities] to main window
[GUI] [Msg] Loaded plugin [SelectEntities] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-sim-8/plugins/gui/libSelectEntities.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [Spawn]
[GUI] [Msg] Added plugin [Spawn] to main window
[GUI] [Msg] Loaded plugin [Spawn] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-sim-8/plugins/gui/libSpawn.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [VisualizationCapabilities]
[GUI] [Msg] View as transparent service on [/gui/view/transparent]
[GUI] [Msg] View as wireframes service on [/gui/view/wireframes]
[GUI] [Msg] View center of mass service on [/gui/view/com]
[GUI] [Msg] View inertia service on [/gui/view/inertia]
[GUI] [Msg] View collisions service on [/gui/view/collisions]
[GUI] [Msg] View joints service on [/gui/view/joints]
[GUI] [Msg] View frames service on [/gui/view/frames]
[GUI] [Msg] Added plugin [Visualization capabilities] to main window
[GUI] [Msg] Loaded plugin [VisualizationCapabilities] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-sim-8/plugins/gui/libVisualizationCapabilities.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [WorldControl]
[GUI] [Msg] Using world control service [/world/car_world/control]
[GUI] [Msg] Listening to stats on [/world/car_world/stats]
[GUI] [Dbg] [WorldControl.cc:237] Using an event to share WorldControl msgs with the server
[GUI] [Msg] Added plugin [World control] to main window
[GUI] [Msg] Loaded plugin [WorldControl] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-gui-8/plugins/libWorldControl.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [WorldStats]
[GUI] [Msg] Listening to stats on [/world/car_world/stats]
[GUI] [Msg] Added plugin [World stats] to main window
[GUI] [Msg] Loaded plugin [WorldStats] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-gui-8/plugins/libWorldStats.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [Shapes]
[GUI] [Msg] Added plugin [Shapes] to main window
[GUI] [Msg] Loaded plugin [Shapes] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-sim-8/plugins/gui/libShapes.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [Lights]
[GUI] [Msg] Added plugin [Lights] to main window
[GUI] [Msg] Loaded plugin [Lights] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-sim-8/plugins/gui/libLights.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [TransformControl]
[GUI] [Msg] Added plugin [Transform control] to main window
[GUI] [Msg] Loaded plugin [TransformControl] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-sim-8/plugins/gui/libTransformControl.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [Screenshot]
[GUI] [Msg] Screenshot service on [/gui/screenshot]
[GUI] [Msg] Added plugin [Screenshot] to main window
[GUI] [Msg] Loaded plugin [Screenshot] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-gui-8/plugins/libScreenshot.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [CopyPaste]
[GUI] [Msg] Added plugin [Copy/Paste] to main window
[GUI] [Msg] Loaded plugin [CopyPaste] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-sim-8/plugins/gui/libCopyPaste.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [ComponentInspector]
[Msg] Found no publishers on /stats, adding root stats topic
[Msg] Found no publishers on /clock, adding root clock topic
[Dbg] [SimulationRunner.cc:547] Creating PostUpdate worker threads: 3
[Dbg] [SimulationRunner.cc:558] Creating postupdate worker thread (0)
[Dbg] [SimulationRunner.cc:558] Creating postupdate worker thread (1)
[Msg] Serving scene information on [/world/car_world/scene/info]
[Msg] Serving graph information on [/world/car_world/scene/graph]
[Msg] Serving full state on [/world/car_world/state]
[Msg] Serving full state (async) on [/world/car_world/state_async]
[Msg] Publishing scene information on [/world/car_world/scene/info]
[Msg] Publishing entity deletions on [/world/car_world/scene/deletion]
[Msg] Publishing state changes on [/world/car_world/state]
[Msg] Publishing pose messages on [/world/car_world/pose/info]
[Msg] Publishing dynamic pose messages on [/world/car_world/dynamic_pose/info]
[Dbg] [EntityComponentManager.cc:1655] Updated state thread iterators: 1 threads processing around 25 entities each.
[Wrn] [Component.hh:144] Trying to serialize component with data type [N3sdf3v145WorldE], which doesn't have `operator<<`. Component will not be serialized.
[Wrn] [Model.hh:69] Skipping serialization / deserialization for models with //pose/@relative_to attribute.
[GUI] [Msg] Added plugin [Component inspector] to main window
[GUI] [Msg] Loaded plugin [ComponentInspector] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-sim-8/plugins/gui/libComponentInspector.so]
[GUI] [Dbg] [Application.cc:528] Loading plugin [EntityTree]
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityTree/EntityTree.qml:148:7: QML ToolButton: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Msg] Added plugin [Entity tree] to main window
[GUI] [Msg] Loaded plugin [EntityTree] from path [/home/monti/Downloads/GazeboHarmonic/install/lib/gz-sim-8/plugins/gui/libEntityTree.so]
[GUI] [Dbg] [Application.cc:398] Loading window config
[GUI] [Msg] Using server control service [/server_control]
[GUI] [Dbg] [Application.cc:671] Applying config
[GUI] [Wrn] [Component.hh:189] Trying to deserialize component with data type [N3sdf3v145WorldE], which doesn't have `operator>>`. Component will not be deserialized.
[GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityTree/EntityTree.qml:148:7: QML ToolButton: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/WorldStats/WorldStats.qml:53:3: QML RowLayout: Binding loop detected for property "x"
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Dbg] [MinimalScene.cc:802] Creating gz-rendering interface for OpenGL
[GUI] [Dbg] [MinimalScene.cc:986] Creating render thread interface for OpenGL
[GUI] [Msg] Loading plugin [gz-rendering-ogre2]
VMware: No 3D enabled (0, Success).
libEGL warning: egl: failed to create dri2 screen
VMware: No 3D enabled (0, Success).
libEGL warning: egl: failed to create dri2 screen
[GUI] [Dbg] [MinimalScene.cc:749] Create scene [scene]
[GUI] [Wrn] [Ogre2RenderTarget.cc:668] Anti-aliasing level of ' is not supported; valid FSAA levels are: [ 0 4 ]. Setting to 1
[GUI] [Dbg] [MinimalScene.cc:1037] Creating texture node render interface for OpenGL
[GUI] [Dbg] [TransformControl.cc:453] TransformControl plugin is using camera [scene::Camera(65527)]
[GUI] [Dbg] [Spawn.cc:308] Spawn plugin is using camera [scene::Camera(65527)]
[GUI] [Dbg] [SelectEntities.cc:452] SelectEntities plugin is using camera [scene::Camera(65527)]
[GUI] [Dbg] [MarkerManager.cc:169] Advertise /marker/list service.
[GUI] [Dbg] [MarkerManager.cc:179] Advertise /marker/list.
[GUI] [Dbg] [MarkerManager.cc:189] Advertise /marker_array.
[GUI] [Dbg] [CameraTracking.cc:172] CameraTrackingPrivate plugin is moving camera [scene::Camera(65527)]
[GUI] [Msg] Move to service on [/gui/move_to]
[GUI] [Msg] Follow service on [/gui/follow]
[GUI] [Msg] Move to pose service on [/gui/move_to/pose]
[GUI] [Msg] Camera pose topic advertised on [/gui/camera/pose]
[GUI] [Msg] Follow offset service on [/gui/follow/offset]
[GUI] [Dbg] [InteractiveViewControl.cc:176] InteractiveViewControl plugin is moving camera [scene::Camera(65527)]
[GUI] [Dbg] [EntityContextMenuPlugin.cc:79] Entity context menu plugin is using camera [scene::Camera(65527)]


@Marco-63
Copy link
Author

Hello Azeey,
please let me know if it would be it ok if I post a link from WeTransfer where you can download my Ubuntu VirtualBox machine so that maybe you can see what's going wrong more easily?

Thank you,
Marco

@azeey
Copy link
Contributor

azeey commented May 20, 2024

Unfortunately, I don't have enough cycles to diagnose the problem that way. I noticed from the logs you have built Gazebo from source. Have you tried the other examples in the examples/worlds directory? Does rolling_shapes.sdf work properly where the shapes roll down the incline?

@Marco-63
Copy link
Author

Marco-63 commented May 23, 2024

Yes, I built Gazebo from source (5 hrs job!) because a had found a post suggesting that it might solve the problem. Unfortunately, noting changes... The problem remains the same: topic /cmd_vel doesn't get published!

I tried to run rolling_shapes.sdf and it works fine!

I would like to show you the following... if you do this:

$ gz topic -t /cmd_vel --info
Publishers [Address, Message Type]:
  tcp://10.0.2.15:34523, gz.msgs.Twist
  tcp://10.0.2.15:34523, gz.msgs.Twist
  tcp://10.0.2.15:34523, gz.msgs.Twist
  tcp://10.0.2.15:34523, gz.msgs.Twist
Subscribers [Address, Message Type]:
  tcp://10.0.2.15:34523, gz.msgs.Twist

$ sudo netstat -tulpn | grep LISTEN
tcp        0      0 10.0.2.15:34871         0.0.0.0:*               LISTEN      12125/gz sim gui    
tcp        0      0 10.0.2.15:46449         0.0.0.0:*               LISTEN      12124/gz sim server 
tcp        0      0 10.0.2.15:41705         0.0.0.0:*               LISTEN      12125/gz sim gui    
tcp        0      0 10.0.2.15:34523         0.0.0.0:*               LISTEN      12124/gz sim server 
tcp        0      0 10.0.2.15:45757         0.0.0.0:*               LISTEN      12124/gz sim server 
tcp        0      0 10.0.2.15:44675         0.0.0.0:*               LISTEN      12125/gz sim gui    
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      10009/cupsd         
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      382/systemd-resolve 
tcp6       0      0 ::1:631                 :::*                    LISTEN      10009/cupsd         

the TCP ports are open but no activity seems to be going on through these ports
Executing the command:
gz topic -t "/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}"
and looking at network traffic with Wireshark...

WShark

this is the only TCP activity in the VM... and the above ports are not involved!

Does this mean anything to you?
Thx!

@azeey
Copy link
Contributor

azeey commented May 23, 2024

I wonder if you have multiple versions of gz-transport installed. Can you try running gz topic --versions?
You can also set the environment variable GZ_VERBOSE=1 before running any gz command it will show more debug messages related to transport.

@Marco-63
Copy link
Author

Hi Azeey,
running gz topic --version gives 13.2.0
After setting the environment variable GZ_VERBOSE I tried to simulate building_robot.sdf. There was a lot of debug messages coming out, but unfortunately I can't figure much out of it. So I'am attaching two files with the logs: one file contains the log after issuing the topic command and the other what came out in the gazebo terminal...
If you can spare 5 more minutes, please have a look at them. Thx!

cmdTopic.txt
Gazebo_after.txt

@azeey
Copy link
Contributor

azeey commented May 30, 2024

That looks okay to me. Can you share the building_robot.sdf file you are using?

@Marco-63
Copy link
Author

I'm starting to think that Gazebo is not able to run in a VirtualBox VM. Do you believe this could be the origin of the problem?

Here is my .sdf file: building_robot.txt (I just changed the extendion to .txt to be able to load the file)

Thx!

@azeey
Copy link
Contributor

azeey commented May 31, 2024

Yeah, I'm suspecting the same thing. It's surprising though since usually the problem is 3D acceleration, not gz-transport communication. I tried your file and it works fine for me locally.

I'm curious why you're using a VM. If your host is Linux Mint, you should be able to use docker. Have you considered that?

@Marco-63
Copy link
Author

Marco-63 commented Jun 4, 2024

Hello Azeey,
at the end of this long story, the reason it didn't work was the virtual machine. I installed the binaries in a physical computer and gz-transport started to communicate!
I'm used to try new things in a VM first and this is why I did it:..

Sorry for all the troubles and thank you very very much for your support.
Now I can finally start experimenting with Gazebo!

@azeey
Copy link
Contributor

azeey commented Jun 4, 2024

I suspect there's some configuration that needs to be set on the VM or host machine to allow gz-transport to work. I've seen others use VirtualBox with Gazebo, but this is the first time I'm hearing of such problems, so I don't want to conclude Gazebo doesn't work on VirtualBox. That being said, I'm glad to hear it's working for you on the host machine. I'll go ahead and close this issue.

@azeey azeey closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants