Gazebo | Ignition | Community
Ask Your Question

stuck in transport::init()

asked 2013-05-08 00:48:46 -0500

frank gravatar image

updated 2013-05-09 02:32:06 -0500

i was testing the example according to the tutorials. I first ran gazebo and then ran listener. I found that the listener stuck at the function transport::init().

The output of listener is

Msg Waiting for master........
Msg Connected to gazebo master @

Here is my code:

#include <transport/transport.hh>
#include <gazebo/msgs/msgs.hh>
#include <gazebo/gazebo.hh>
#include "transport/Node.hh"
#include "transport/Publisher.hh"
#include "transport/Subscriber.hh"
#include "transport/ConnectionManager.hh"
#include "transport/Transport.hh"

#include "msgs/msgs.hh"
#include "common/Events.hh"
#include "transport/TopicManager.hh"

#include "gazebo_config.h"

#include <iostream>

using namespace gazebo;

// Function is called everytime a message is received.
void cb(ConstWorldStatisticsPtr &_msg)
  // Dump the message contents to stdout.
  std::cout << _msg->DebugString();

int main(int _argc, char **_argv)
  printf("transport init...\n");
  std::string host = "localhost";
  unsigned int port = 11345;
  printf("topic manager init ok...\n");

  //transport::ConnectionManager()::Instance()->stop = false;

  if (!transport::ConnectionManager::Instance()->Init(host, port))
      printf("return false\n");

    printf("return true\n");

  // Create our node for communication
  gazebo::transport::NodePtr node(new gazebo::transport::Node());

  // Listen to Gazebo world_stats topic
  gazebo::transport::SubscriberPtr sub = node->Subscribe("~/world_stats", cb);


  // Busy wait loop...replace with your own code as needed.
  while (true)

  // Make sure to shut everything down.

And i found that it got stuck in the code

if (!transport::ConnectionManager::Instance()->Init(host, port))
      printf("return false\n");

Can you help me? Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-09 07:24:03 -0500

frank gravatar image

I know what happened! I got another app using boost-1.53.0 But gazebo1.7.2 uses boost-1.46, and so the listener above does. I removed boost-1.53.0 and the listener works well.

But how can i handle the conflict bewteen the different version of boost? My other apps need the newest version of boost. Thank you.

edit flag offensive delete link more


If you [build gazebo from source](, you can use the latest version of boost.

scpeters gravatar imagescpeters ( 2013-05-10 11:49:54 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-05-08 00:48:46 -0500

Seen: 215 times

Last updated: May 09 '13