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
getting_started:tutorials:systemros1 [2026/04/09 08:31] – [Publishing] ursgrafgetting_started:tutorials:systemros1 [2026/04/12 16:01] (current) – [Using ROS2] ursgraf
Line 80: Line 80:
 Open a shell in the build directory of your EEROS library and run  Open a shell in the build directory of your EEROS library and run 
 <code> <code>
-sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH ./examples/ros2/rosTest1+$ ./examples/ros2/rosTest1
 </code> </code>
-IMPORTANT You have to run a program using real time threads with root privileges. +
 ==== 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
Line 113: Line 113:
  
 ==== Subscribing ==== ==== Subscribing ====
 +The topic ''/test/twistStamped'' is published by our node and received at the same time. You should be able to observe the values in the log.
 +
 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'' runs, your example application will receive the two topics
-  * /rosNodeTalker/vector  (of type Matrix<2,1,double>+  * /rosNodeTalker/analogSignal        (of type eeros_msgs/msg/AnalogSignal) 
-  * /rosNodeTalker/val     (of type double+  * /rosNodeTalker/analogSignalVector  (of type eeros_msgs/msg/AnalogSignal
-and logs its transported message values into the console. Alternatively you could publish a single message from the command line with +  * /rosNodeTalker/digitalSignal       (of type eeros_msgs/msg/DigitalSignal) 
 +  * /rosNodeTalker/digitalSignalVector (of type eeros_msgs/msg/DigitalSignal) 
 +  * /rosNodeTalker/twist               (of type geometry_msgs/msg/Twist) 
 + 
 +and logs its transported message values into the console. Alternatively you could publish messages from the command line with 
 <code> <code>
-$ ros2 topic pub /rosNodeTalker/val example_interfaces/msg/Float64 "data-2.3+$ ros2 topic pub /rosNodeTalker/analogSignal    eeros_msgs/msg/AnalogSignal "{timestamp{sec: 1, nanosec: 1000}, val: [10.5]}
-$ ros2 topic pub /rosNodeTalker/vector example_interfaces/msg/Float64MultiArray "{layout: {dim[]data_offset0}, data: [2.5, 1.76]}"+$ ros2 topic pub /rosNodeTalker/analogSignalVector  eeros_msgs/msg/AnalogSignal "{timestamp: {sec2nanosec2000}, val: [-1, 0.5]}"
 </code> </code>
  
getting_started/tutorials/systemros1.1775716319.txt.gz · Last modified: by ursgraf