User Tools

Site Tools


eeros_architecture:control_system:available_blocks:rossublaserscan

Differences

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

Link to this comparison view

Next revision
Previous revision
eeros_architecture:control_system:available_blocks:rossublaserscan [2017/11/01 22:58] – created grafeeros_architecture:control_system:available_blocks:rossublaserscan [2023/02/27 16:53] (current) ursgraf
Line 1: Line 1:
-====== ROS Subcriber Laser Scan ======+====== ROS Subscriber Laser Scan ======
 This block receives a ROS message of type ''sensor_msgs::LaserScan''. Each time the block is run by its time domain, the last message received is driven on its output signals. This block receives a ROS message of type ''sensor_msgs::LaserScan''. Each time the block is run by its time domain, the last message received is driven on its output signals.
 <code cpp> <code cpp>
-  // define a handler for ROS nodes +  // create subscriber block, laserscanner range has a size of 150 values 
-  ros::NodeHandle rosNodeHandler;                                     +  RosSubscriberLaserScan<Matrix<150, 1, double>, Matrix<150, 1, double >> laserScan("myNode/myTopic", 100, false);
-  // create subcriber block, laserscanner range has a size of 150 values +
-  RosSubscriberLaserScan<Matrix<150, 1, double>, Matrix<150, 1, double >> laserScan(rosNodeHandler, "myNode/myTopic", 100, false);+
 </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.
 +
 +For ROS2 you have to pass the node, from where the topic is received. The ROS2 message is of type ''std_msgs::msg::LaserScan''.
 +<code cpp>
 +  RosSubscriberLaserScan<Matrix<150, 1, double>, Matrix<150, 1, double >> laserScan(node, "myNode/myTopic", 100, false);
 +</code>
 +
eeros_architecture/control_system/available_blocks/rossublaserscan.1509573493.txt.gz · Last modified: 2017/11/01 22:58 (external edit)