Skip to content

MallikarjunTirlapur/programming_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test the coder

Task:

Write a ROS node that calculates the moving maximum (running maximum) over 1000 samples in (soft) realtime of an incoming stream of Uint64s. Publish your result after processing the incoming number and in addition forward the incoming number to the verifying node.

Requirements

  • a working ROS distribution
  • Indigo or Jade
  • Python 2.7

Steps:

  1. Create either a C++ or Python ROS node
  1. Subscribe to the publisher node
  • topic: /numbers
  • type: Int64
  1. Advertise your solution topic
  • topic: /verify
  • type: programming_test/Solution
  1. Do your magic...
  2. Publish your solution after you have incorporated the latest incoming data point. Include (forward) the incoming data point on the input slot of the message.
  3. Add your node to the launch file.

The data structure queue has been used to calculate the moving maximum over 1000 samples in realtime of an incoming stream.

The window size is 1000. The incoming data is en-queued into a queue untill queue reaches 1000. In the mean time maximum is calculated in the real time from elements in the growing queue. The incoming data and result are published on input and solution slot of the message respectively.
Once the size of the queue reaches 1000, The maximum out of 1000 numbers is calculated. De-queued the oldest number to give a room to the newest number. The incoming number is published on the input slot and result on the solution slot of the message. Process repeated.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors