User Tools

Site Tools


eeros_architecture:control_system:available_blocks:rossublaserscan

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.

  // create subscriber block, laserscanner range has a size of 150 values
  RosSubscriberLaserScan<Matrix<150, 1, double>, Matrix<150, 1, double >> laserScan("myNode/myTopic", 100, false);

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.

  RosSubscriberLaserScan<Matrix<150, 1, double>, Matrix<150, 1, double >> laserScan(node, "myNode/myTopic", 100, false);
eeros_architecture/control_system/available_blocks/rossublaserscan.txt · Last modified: 2023/02/27 16:53 by ursgraf