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

Command-line action server interface?

asked 2011-08-08 15:03:34 -0600

Dang gravatar image

updated 2011-08-08 21:07:55 -0600

Lorenz gravatar image

Hi Rossers,

Is there an easy command-line way to call an action server? Like... rosaction actionserver goal?

Dan

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
5

answered 2011-08-14 08:28:16 -0600

vpradeep gravatar image

For a simpler (hackier) solution than rosh, you could actually use

> rostopic pub [action_ns]/goal [action_type]ActionGoal [fill in fields here]

This will send a goal message directly to the action server. The action server has been designed to handle goals from "dumb action clients", such as rostopic pub. You don't even have to bother filling in the header goal_id fields in the message.

edit flag offensive delete link more

Comments

An example please...

shubhamv gravatar image shubhamv  ( 2019-03-29 04:43:59 -0600 )edit

Type rostopic pub [your_action]/goal and press tab to auto-complete.

fvd gravatar image fvd  ( 2020-09-07 00:23:15 -0600 )edit
11

answered 2011-08-09 06:12:29 -0600

eitan gravatar image

There's not a true command line interface to send a goal, besides rostopic pub, but there are light-weight GUI tools for both action clients and action servers:

  • Client: rosrun actionlib axclient.py
  • Server rosrun actionlib axserver.py

Hopefully, these suit your needs.

edit flag offensive delete link more

Comments

1

Does not work when connecting on a SSH a machine that has no X server!

VictorLamoine gravatar image VictorLamoine  ( 2017-11-24 10:30:51 -0600 )edit

Remember to set $ROS_MASTER_URI and $ROS_IP when using this with an action server running on another computer. Not sure why that is necessary, since I can rostopic pub and rostopic echo without setting ROS_MASTER_URI and ROS_IP...

Rufus gravatar image Rufus  ( 2021-02-16 23:45:17 -0600 )edit
4

answered 2011-08-09 16:38:34 -0600

kwc gravatar image

You can use rosh as an interactive command line for calling actions. It supports tab-completion and uses Python syntax.

http://www.ros.org/wiki/rosh

You will need to load the 'rosh_common' plugin to support actions

e.g.

actions.add_two_ints()

edit flag offensive delete link more

Comments

I cannot find any rosh package, where is it?

VictorLamoine gravatar image VictorLamoine  ( 2017-11-24 10:32:23 -0600 )edit

Looks like it's been deprecated since Kinetic

troniak gravatar image troniak  ( 2018-06-22 10:20:43 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2011-08-08 15:03:34 -0600

Seen: 11,525 times

Last updated: Aug 14 '11