Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I can see some gazebo topics, but not all of them...

I'm writing a matlab interface to gazebo. I have code that, when run from the command line, sees all of the gazebo topics I'm expecting, eg

gazebo::transport::get_master_uri(_master_host, _master_port);
std::cout << "Host: " << _master_host << "\tport: " << _master_port <<"\n";

topics_list = gazebo::transport::getAdvertisedTopics("");
for(std::list<std::string>::iterator topic=topics_list.begin(); topic!=topics_list.end(); topic++) {
    std::cout << (*topic) << "\n";
}

gives the expected result, which is around fifty different topics. But that same code, when copied into a mex file (a specialized C++ plugin format for Matlab), and executed as a Matlab plugin, only returns a subset of the topics:

Host: localhost port: 11345
/gazebo/default/pose/local/info
/gazebo/default/pose/info
/gazebo/default/gui
/gazebo/default/response
/gazebo/default/world_stats
/gazebo/default/model/info
/gazebo/default/light/modify
/gazebo/default/physics/contacts
/gazebo/default/visual
/gazebo/default/request
/gazebo/default/joint
/gazebo/default/user_cmd_stats
/gazebo/default/world_control
/gazebo/default/model/modify
/gazebo/world/modify
/gazebo/default/diagnostics
/gazebo/default/log/status
/gazebo/default/undo_redo
/gazebo/default/factory
/gazebo/default/factory/light
/gazebo/default/selection
/gazebo/default/scene
/gazebo/default/physics
/gazebo/default/user_camera/pose
/gazebo/default/user_cmd
/gazebo/default/playback_control
/gazebo/default/log/control
/gazebo/server/control

I'm kind of at a loss. Is there anything special about these particular topics that would cause partially functioning code, or code that was being executed in a strange environment or with misconfigured environmental variables, to see them but not others?

I can see some gazebo topics, but not all of them...

I'm writing a matlab interface to gazebo. I have code that, when run from the command line, sees all of the gazebo topics I'm expecting, eg

gazebo::transport::get_master_uri(_master_host, _master_port);
std::cout << "Host: " << _master_host << "\tport: " << _master_port <<"\n";

topics_list = gazebo::transport::getAdvertisedTopics("");
for(std::list<std::string>::iterator topic=topics_list.begin(); topic!=topics_list.end(); topic++) {
    std::cout << (*topic) << "\n";
}

gives the expected result, which is around fifty different topics. But that same code, when copied into a mex file (a specialized C++ plugin format for Matlab), and executed as a Matlab plugin, only returns a subset of the topics:

Host: localhost port: 11345
/gazebo/default/pose/local/info
/gazebo/default/pose/info
/gazebo/default/gui
/gazebo/default/response
/gazebo/default/world_stats
/gazebo/default/model/info
/gazebo/default/light/modify
/gazebo/default/physics/contacts
/gazebo/default/visual
/gazebo/default/request
/gazebo/default/joint
/gazebo/default/user_cmd_stats
/gazebo/default/world_control
/gazebo/default/model/modify
/gazebo/world/modify
/gazebo/default/diagnostics
/gazebo/default/log/status
/gazebo/default/undo_redo
/gazebo/default/factory
/gazebo/default/factory/light
/gazebo/default/selection
/gazebo/default/scene
/gazebo/default/physics
/gazebo/default/user_camera/pose
/gazebo/default/user_cmd
/gazebo/default/playback_control
/gazebo/default/log/control
/gazebo/server/control

Topics that do not show up include

/gazebo/default/user_camera/joy_pose /gazebo/default/user_camera/joy_twist /gazebo/default/ground_plane/link/wrench /gazebo/default/gzclient_camera/cmd /gazebo/default/skeleton_pose/info /gazebo/default/sky /gazebo/default/light /gazebo/default/model/modify

I'm kind of at a loss. Is there anything special about these particular topics that would cause partially functioning code, or code that was being executed in a strange environment or with misconfigured environmental variables, to see them but not others?

I can see some gazebo topics, but not all of them...

I'm writing a matlab interface to gazebo. I have code that, when run from the command line, sees all of the gazebo topics I'm expecting, eg

gazebo::transport::get_master_uri(_master_host, _master_port);
std::cout << "Host: " << _master_host << "\tport: " << _master_port <<"\n";

topics_list = gazebo::transport::getAdvertisedTopics("");
for(std::list<std::string>::iterator topic=topics_list.begin(); topic!=topics_list.end(); topic++) {
    std::cout << (*topic) << "\n";
}

gives the expected result, which is around fifty different topics. But that same code, when copied into a mex file (a specialized C++ plugin format for Matlab), and executed as a Matlab plugin, only returns a subset of the topics:

Host: localhost port: 11345
/gazebo/default/pose/local/info
/gazebo/default/pose/info
/gazebo/default/gui
/gazebo/default/response
/gazebo/default/world_stats
/gazebo/default/model/info
/gazebo/default/light/modify
/gazebo/default/physics/contacts
/gazebo/default/visual
/gazebo/default/request
/gazebo/default/joint
/gazebo/default/user_cmd_stats
/gazebo/default/world_control
/gazebo/default/model/modify
/gazebo/world/modify
/gazebo/default/diagnostics
/gazebo/default/log/status
/gazebo/default/undo_redo
/gazebo/default/factory
/gazebo/default/factory/light
/gazebo/default/selection
/gazebo/default/scene
/gazebo/default/physics
/gazebo/default/user_camera/pose
/gazebo/default/user_cmd
/gazebo/default/playback_control
/gazebo/default/log/control
/gazebo/server/control

Topics that do not show up include

/gazebo/default/user_camera/joy_pose
 /gazebo/default/user_camera/joy_twist
 /gazebo/default/ground_plane/link/wrench
 /gazebo/default/gzclient_camera/cmd
 /gazebo/default/skeleton_pose/info
 /gazebo/default/sky
 /gazebo/default/light
   /gazebo/default/model/modify

/gazebo/default/model/modify

I'm kind of at a loss. Is there anything special about these particular topics that would cause partially functioning code, or code that was being executed in a strange environment or with misconfigured environmental variables, to see them but not others?