Browse Source

Fixed indentation issue in example 2 markdown file.

main
Alan G. Sanchez 2 years ago
parent
commit
c6ba56d7e9
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      example_2.md

+ 6
- 6
example_2.md View File

@ -80,19 +80,19 @@ from math import sin
from sensor_msgs.msg import LaserScan from sensor_msgs.msg import LaserScan
class ScanFilter: class ScanFilter:
"""
A class that implements a LaserScan filter that removes all of the points
that are not in front of the robot.
"""
"""
A class that implements a LaserScan filter that removes all of the points
that are not in front of the robot.
"""
def __init__(self): def __init__(self):
self.width = 1.0 self.width = 1.0
self.extent = self.width / 2.0 self.extent = self.width / 2.0
self.sub = rospy.Subscriber('/scan', LaserScan, self.callback) self.sub = rospy.Subscriber('/scan', LaserScan, self.callback)
self.pub = rospy.Publisher('filtered_scan', LaserScan, queue_size=10) self.pub = rospy.Publisher('filtered_scan', LaserScan, queue_size=10)
rospy.loginfo("Publishing the filtered_scan topic. Use RViz to visualize.")
rospy.loginfo("Publishing the filtered_scan topic. Use RViz to visualize.")
def callback(self,msg): def callback(self,msg):
"""
"""
Callback function to deal with incoming LaserScan messages. Callback function to deal with incoming LaserScan messages.
:param self: The self reference. :param self: The self reference.
:param msg: The subscribed LaserScan message. :param msg: The subscribed LaserScan message.

Loading…
Cancel
Save