User Tools

Site Tools


getting_started:tutorials:systemros1

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:systemros1 [2023/02/09 10:35] – [Using ROS2] ursgrafgetting_started:tutorials:systemros1 [2023/02/09 11:00] – [Subscribing] ursgraf
Line 33: Line 33:
 $ rostopic list $ rostopic list
 </code> </code>
-will list the two topics which are published be our node, ///test/val//, ///test/vector//, and ///test/safetyLevel//.+will list the three 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 83: Line 83:
 With  With 
 <code> <code>
-rosnode list+ros2 node list
 </code> </code>
 you will see the new node.  you will see the new node. 
 <code> <code>
-rostopic list+ros2 topic list
 </code> </code>
-will list the two topics which are published be our node, ///test/val//, ///test/vector//, and ///test/safetyLevel//.+will list the three 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>
-rostopic echo /test/vector+ros2 topic echo /test/vector
 </code> </code>
 With  With 
 <code> <code>
-rostopic hz /test/val +ros2 topic 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> </code>
 +you can easily check how often data is sent from out ROS node. 
  
 ==== Subscribing ==== ==== Subscribing ====
Line 109: Line 106:
 and logs its transported message values into the console. Alternatively you could publish a single message from the command line with  and logs its transported message values into the console. Alternatively you could publish a single message from the command line with 
 <code> <code>
-rostopic pub /rosNodeTalker/val std_msgs/Float64 -- -2.3 +ros2 topic pub /rosNodeTalker/val std_msgs/msg/Float64 "data: -2.3" 
-rostopic pub /rosNodeTalker/vector std_msgs/Float64MultiArray "{layout: {dim: [], data_offset: 0}, data: [2.5, 1.76]}"+ros2 topic pub /rosNodeTalker/vector std_msgs/msg/Float64MultiArray "{layout: {dim: [], data_offset: 0}, data: [2.5, 1.76]}"
 </code> </code>
  
getting_started/tutorials/systemros1.txt · Last modified: 2023/02/27 14:00 by ursgraf