ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rosjava: how to call Services of move_base

asked 2018-10-02 10:38:47 -0500

manster2209 gravatar image

updated 2018-10-04 02:02:04 -0500

I want to call the costmap_clear service of a rosndk native move_base node from ROSjava. I found an example in the Rosjava docu. But i cant see the service when i start move_base. Its not listed in rosnode info and not in rosservice list. I tried starting the move_base node on my pc but still no services.... Do i have to somehow start the service before i can call it? Thanks in advance

EDIT: only 2 services are listed under move_base: /move_base/get_loggers /move_base/set_logger_level

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-10-02 12:19:41 -0500

jubeira gravatar image

Hi @manster2209,

If you start the node but you don't see the service listed in move_base, it's likely that something went wrong during the initialization.

move_base should provide the service server for that service; if that part doesn't start you won't be able to call it using rosjava nor anything else.

Take a look at the documentation for move_base : http://wiki.ros.org/move_base . Then take a look at the output of your program. Do you see any errors? For the current kinetic branch, the code starting the service server is here: https://github.com/ros-planning/navig... . There are a bunch of conditions that may cause the node to exit before getting there, so I'd start looking at that.

Once you see the service listed, calling it using Rosjava is a separate problem.

edit flag offensive delete link more

Comments

Well the thing is otherwise move_base works as it is supposed to. I can drive my robot around and all. I just don't see the services... no errors

manster2209 gravatar image manster2209  ( 2018-10-04 01:55:24 -0500 )edit

Which version of move_base are you using? the cross compiled one in https://github.com/ekumenlabs/roscpp_... ?

jubeira gravatar image jubeira  ( 2018-10-04 07:15:53 -0500 )edit

yes that one!

manster2209 gravatar image manster2209  ( 2018-10-23 06:22:30 -0500 )edit

I just checked and the version that is being cross compiled is move_base 1.12.3. The source code looks similar at that place: https://github.com/ros-planning/navig... so the service should be available. If you don't see it, you should see some error log

jubeira gravatar image jubeira  ( 2018-10-30 14:23:11 -0500 )edit

Question Tools

Stats

Asked: 2018-10-02 10:38:47 -0500

Seen: 473 times

Last updated: Oct 04 '18