User Tools

Site Tools


getting_started:tutorials:controlsystemros1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
getting_started:tutorials:controlsystemros1 [2019/01/17 09:04] – [Publishing] grafgetting_started:tutorials:controlsystemros1 [2019/01/17 11:49] – [Publishing] graf
Line 2: Line 2:
 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 ''sudo -E examples/ros/rosTest1''. \\ 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 ''sudo -E examples/ros/rosTest1''. \\
 ==== Publishing ==== ==== Publishing ====
-This example runs your EEROS application as a ROS node under the name ///rosTest//. It publishes two topics +This example runs your EEROS application as a ROS node under the name ///eerosNode//. It publishes three topics 
-  * /test/vector  (of type Matrix<7,1,double>+  * /test/vector          (of type Matrix<7,1,double>
-  * /test/val     (of type double)+  * /test/val             (of type double
 +  * /test/safetyLevel     (of type unit32_t)
  
 With  With 
Line 14: Line 15:
 $ rostopic list $ rostopic list
 </code> </code>
-will list the two topics which are published be our node, ///test/val// and ///test/vector//.+will list the two topics which are published be our node, ///test/val/////test/vector//, and ///test/safetyLevel//.
 Open another shell to show the messages sent by EEROS, e.g. Open another shell to show the messages sent by EEROS, e.g.
 <code> <code>
Line 23: Line 24:
 $ rostopic hz /test/val $ rostopic hz /test/val
 </code> </code>
-you can easily check how often data is sent from out ROS node. Try to plot some of the data with+you can easily check how often data is sent from out ROS node. Try to plot the data with
 <code> <code>
-$ rqt_plot /test/val /test1/vector/data[0] /test/vector/data[1]+$ rqt_plot /test/val /test1/vector/data[0] /test/vector/data[1] /test/safetyLevel
 </code> </code>
  
 ==== Subscribing ==== ==== 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+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'' runsyour example application will receive the two topics
   * /rosNodeTalker/vector  (of type Matrix<2,1,double>)   * /rosNodeTalker/vector  (of type Matrix<2,1,double>)
   * /rosNodeTalker/val     (of type double)   * /rosNodeTalker/val     (of type double)