Caution: Currently this feature available only for jros1client
jros1client Java module exposes some of its functionality in a form of standalone application.
Using jrosclient command you can list available ROS topics and subscribe to them.
jrosclient command is available inside jros1client package. Once you install this package the command will be available at:
JROS1CLIENT_INSTALL_DIR/jrosclient
Where JROS1CLIENT_INSTALL_DIR is jros1client installation folder.
To use this command please add it to your PATH environment:
And restart your terminal session.
jrosclient [--masterUrl MASTER_URL] [--nodePort NODE_PORT] [--truncate MAX_LENGTH] [--debug] <COMMAND> [args ...]
Where:
Options:
Display COUNT messages published to a topic. If COUNT is not set keep displaying messages forever:
rostopic echo [-n COUNT]
Print information about all publishers, subscribers in the system:
rostopic list
Here is an example how to subscribe to the topics using jrosclient command.
First run helloRos topic publisher using rostopic command:
Now we can subscribe to it and receive published messages with jrosclient command:
{ "data": "Hello ROS" } { "data": "Hello ROS" } { "data": "Hello ROS" }