Mini PA: Filter Scan

Plan for today

  • This lab will be a guided team programming session.
  • Work on it with your Teammate
  • You can use a breakout room for privacy
  • Invite one of us over to help if needed
  • Call us in when you are done

Mini-PA: Filter Scan

  1. Write a node that subscribes to /scan and publishes a new topic /lidar
  2. /lidar’s message is a custom message called “ScanFiltered.msg”
  3. The data from /scan is cleaned and filtered mapped based on parameters
  4. And published as /scan_filtered
  5. Parameter is: NUM_SLICES: how many slices you want in the result
  6. Lidar.msg will contain an array NUM_SLICES with that many slices
  7. And the filtered and cleaned “average” distance in the direction of the slice
  8. Tricky: It would be nice if Slice 0 always is “forward”
  9. Figure out a way to visualize the result

Tips

  • Here’s a tutorial on creating a custom message
  • In your code, you will need to create a node, a subscriber to /scan and a publisher to /scan_filtered
  • You don’t need a main loop, just a call to rospy.spin()