User Tools

Site Tools


getting_started:tutorials:hal4

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:hal4 [2019/01/17 12:27] grafgetting_started:tutorials:hal4 [2019/01/17 13:35] – [Subscribing] graf
Line 4: Line 4:
 ==== Publishing ==== ==== Publishing ====
 This example runs your EEROS application as a ROS node under the name ///eerosNode//. It publishes three 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/val         (of type double) 
-  * /test/val             (of type double) +  * /test/state       (of type boolean)
-  * /test/safetyLevel     (of type unit32_t)+
  
-With  +Use the same tools as in [[getting_started:tutorials:controlsystemros1|]] to show nodes, topics and messages.
-<code> +
-$ rosnode list +
-</code> +
-you will see the new node. With  +
-<code> +
-$ rostopic list +
-</code> +
-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. +
-<code> +
-$ rostopic echo /test/vector +
-</code> +
-With  +
-<code> +
-$ rostopic hz /test/val +
-</code> +
-you can easily check how often data is sent from out ROS node. Try to plot the data with +
-<code> +
-$ rqt_plot /test/val /test1/vector/data[0] /test/vector/data[1] /test/safetyLevel +
-</code>+
  
-This example runs your EEROS application as a ROS node under the name ''rosTest1''. It publishes two topics +==== Subscribing ==== 
-  * /test1/vector  (of type Matrix<7,1,double>+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 
-  * /test1/val     (of type double+  * /rosNodeTalker/val    (of type double) 
- +  * /rosNodeTalker/state  (of type boolean
-Use the ROS tool ''rqt'' to list your nodes and topics.  +and logs its transported message values into the consoleUse
-Open another shell to show the messages sent by EEROS, e.g.+
 <code> <code>
-rostopic echo /test1/vector+rqt_graph
 </code> </code>
 +to show a graph with all involved nodes together with their topics.
  
-Open another shell in the build directory of your EEROS library and run ''rosNodeTalker''This starts a ROS node which publishes a couple of test topicsAs soon as ''rosNodeTalker'' runs your example application will receive the two topics +==== Another Example ==== 
-  * /rosNodeTalker/vector  (of type Matrix<2,1,double>+There is another example, RosExample with HalConfigRos.jsonIt demonstrates the use of more message types. Howeverthe example was never stripped of unnecessary bits.
-  * /rosNodeTalker/val     (of type double) +
-and logs its transported message values into the console. +
getting_started/tutorials/hal4.txt · Last modified: 2023/02/27 14:02 by ursgraf