Home | Tutorials | Wiki | Issues
Ask Your Question
0

how does the request<-->response work?

asked 2014-10-28 08:46:40 -0500

shpower gravatar image

Hi,

I saw this command:

boost::sharedptr<msgs::response> response = transport::request(getworld(), "world_sdf");

Can somebody explain how the request command works? Is there a list of requests that I can send?

Thanks in advance,

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2014-10-29 15:29:50 -0500

scpeters gravatar image

I don't think it's well-documented anywhere yet. It's kind of informal; there isn't a master list of things that can be requested. There's just a standard topic ~/request the request providers subscribe to and that requesters can advertise.

I grepped for Subscribe.*~/request in gazebo and found the following list of request providers:


./gazebo/gui/GLWidget.cc
./gazebo/gui/ModelListWidget.cc
./gazebo/gui/ModelRightMenu.cc
./gazebo/physics/HeightmapShape.cc
./gazebo/physics/PhysicsEngine.cc
./gazebo/physics/World.cc
./gazebo/rendering/Scene.cc

To see the requests provided by a given provider, you have to look at the code. For example, see World::ProcessRequestMsgs in World.cc to see some of the following:


    if ((*iter).request() == "entity_list")
…
    else if ((*iter).request() == "entity_delete")
…
    else if ((*iter).request() == "entity_info")
...

This is only a partial answer, but I'll add more if there are further questions.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-10-28 08:46:40 -0500

Seen: 582 times

Last updated: Oct 29 '14