User Tools

Site Tools


eeros_architecture:control_system:available_blocks:rospublaserscan

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
eeros_architecture:control_system:available_blocks:rospublaserscan [2020/09/17 15:50] ursgrafeeros_architecture:control_system:available_blocks:rospublaserscan [2023/02/09 12:01] (current) ursgraf
Line 2: Line 2:
 This block samples the sensor signal of a laser scanner at its inputs and packs it into a ROS message of type ''sensor_msgs::LaserScan''. Each time the block is run by its time domain, this message is published under a given topic name. This block samples the sensor signal of a laser scanner at its inputs and packs it into a ROS message of type ''sensor_msgs::LaserScan''. Each time the block is run by its time domain, this message is published under a given topic name.
 <code cpp>                                  <code cpp>                                 
-// create publisher block, laserscanner range has a size of 150 values +// create publisher block, lasers canner range has a size of 150 values 
-RosPublisherLaserScan<Matrix<150, 1, double>, Matrix<150, 1, double >> laserScan("myNode/myTopic", "laser", 100);+RosPublisherLaserScan<Matrix<150, 1, double>, Matrix<150, 1, double >> laserScan("myTopic", "laser", 100); 
 +</code> 
 +For ROS2 you have to pass the node, from where the topic is sent. The ROS2 message is of type std_msgs::msg::LaserScan. 
 +<code cpp>                                  
 +// create publisher block, lasers canner range has a size of 150 values 
 +RosPublisherLaserScan<Matrix<150, 1, double>, Matrix<150, 1, double >> laserScan(node, "myTopic", "laser", 100);
 </code> </code>
  
 The template parameter of the block determines the size of the range and intensity vectors. The time stamp of the signal is transmitted in the message header. The template parameter of the block determines the size of the range and intensity vectors. The time stamp of the signal is transmitted in the message header.
eeros_architecture/control_system/available_blocks/rospublaserscan.1600350633.txt.gz · Last modified: 2020/09/17 15:50 by ursgraf