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
Next revision
Previous revision
eeros_architecture:control_system:available_blocks:rospublaserscan [2017/11/01 22:55] grafeeros_architecture:control_system:available_blocks:rospublaserscan [2023/02/09 12:01] (current) ursgraf
Line 1: Line 1:
 ====== ROS Publisher Laser Scan ====== ====== ROS Publisher Laser Scan ======
 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>                                  
-  // define handler for ROS nodes +// create publisher block, lasers canner range has size of 150 values 
-  ros::NodeHandle rosNodeHandler;                                     +RosPublisherLaserScan<Matrix<150, 1, double>, Matrix<150, 1, double >> laserScan("myTopic", "laser", 100); 
-  // create publisher block, laserscanner range has a size of 150 values +</code> 
-  RosPublisherLaserScan<Matrix<150, 1, double>, Matrix<150, 1, double >> laserScan(rosNodeHandler, "myNode/myTopic", 100);+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 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.1509573309.txt.gz · Last modified: 2017/11/01 22:55 (external edit)