User Tools

Site Tools


getting_started:tutorials:controlsystemros1

Control System Interacting with ROS

In the EEROS library you will find a directory with examples. Open a shell and run roscore. Open another shell in the build directory of your EEROS library and run examples/ros/rosTest1.

Publishing

This example runs your EEROS application as a ROS node under the name /rosTest1. It publishes two topics

  • /test1/vector (of type Matrix<7,1,double>)
  • /test1/val (of type double)

With

$ rosnode list

you will see the new node. With

$ rostopic list

will list the two topics which are published be our node, /test1/val and /test1/vector. Open another shell to show the messages sent by EEROS, e.g.

$ rostopic echo /test1/vector

With

$ rostopic hz /test1/val

you can easily check how often data is sent from out ROS node. Try to plot some of the data with

$ rqt_plot /test1/val /test1/vector/data[0] /test1/vector/data[1]

Subscribing

Open another shell in the build directory of your EEROS library and run rosNodeTalker. This is not a EEROS program but simply starts a ROS node which publishes a couple of test topics. As soon as rosNodeTalker runs your example application will receive the two topics

  • /rosNodeTalker/vector (of type Matrix<2,1,double>)
  • /rosNodeTalker/val (of type double)

and logs its transported message values into the console. Use

$ rqt_graph

to show a graph with all involved nodes together with their topics.

getting_started/tutorials/controlsystemros1.txt · Last modified: 2018/09/29 11:41 by graf