Make a fork of this repo and create a branch in the fork with the following name: [firstname]_[lastname_initial]
Example: atulya_s
Complete levels 0 to 15 of the Bandit wargame.
-
Create a markdown file named
otw.md
. -
For each level (0 to 15), write a short 2β3 line explanation covering:
- What the level asked for
- How you solved it (commands, logic, etc.)
-
Commit this file to your branch.
You got your dream job in MAANG. To give other employees a run for their money, you have to come up with an OOPS-based content rental client.
Create a Netflix-style inventory management system using Object-Oriented Programming (OOPS). The system should manage a collection of movies, TV shows, and users, allowing them to browse, rent, and return content. NOTE: Your Program should retain its memory of whatever data has been fed by the user
- The system should be accessed via a CLI (Command Line Interface).
- It should have options for:
- User Login / Sign-Up
- Admin Login
- Users choose their own username. The system should ensure uniqueness of usernames.
- Browse content by category (Movies or TV Shows) or genre.
- Search content by title or genre.
- Rent movies or TV shows.
- Return rented content.
- View currently rented items along with:
- Date rented
- Last date of return
- View purchased items.
- Check total charges due.
- Add new movies and TV shows.
- Remove existing movies and TV shows.
- Check charges due for any user.
- Title
- Genre
- Rating
is_rented
is_purchased
- Duration
- Rent cost
- Purchase cost
- Seasons
- Episodes per season
- Per season rent cost
- Per season purchase cost
- Fork the GitHub repository.
- Create a new branch with your name:
Format β[firstname]_[lastname_initial]
(e.g.,atulya_s
) - Submit a pull request by:
11:59:59 PM, 13th May 2025 - For any doubts, open an issue on the main repo.
- The task should be contained in a directory structured as Task2/{[firstname]_[lastname_initial]}/
- Also your code should be written in C++
- Your Code should have a Dockerfile along with it and we should be able to run it through docker as well
- Do not use GPT or other AI tools as we might very well ask you to explain your code as well as your thought process.
- Use your own logic and write clean, structured code.
- If you think you can make the program with alternative methods like MongoDB or SQL then you are free to do so.(But then your code should still run inside docker satisfying all the requirements)
- Feel free to get creative with features, but stick to the core requirements.
- Hint: For storage think of each object as a file.
Create a ROS 2-based Printer Server system where:
- Users can submit print jobs via a ROS 2 service.
- Jobs are queued and processed sequentially.
- Status of each job is published to a ROS 2 topic.
- The entire system runs inside a Docker container.
This task helps in understanding ROS 2 services, publishers/subscribers, custom messages, managing node logic, and containerization.
Custom service to submit print jobs.
Definition:
string document_name
---
bool accepted
Responsible for:
- Receiving print job service calls.
- Queueing jobs internally.
- Processing one job at a time (simulated delay).
- Publishing status messages for each job.
Publishes: /print_status
(std_msgs/String
)
Service Server: /print_job
(uses PrintJob.srv
)
Status Examples:
- "Job Queued: file1.pdf"
- "Started printing: file1.pdf"
- "Completed printing: file1.pdf"
Create a dedicated ROS 2 node that sends print job requests to the server by calling the /print_job
service.
Responsibilities:
- Accept document names as input from the user or argument.
- Send a request using the
PrintJob
service. - Optionally, subscribe to
/print_status
to track progress.
printer_system/
βββ printer_server/
β βββ printer_node.py # Contains queue and service logic
β βββ CMakeLists.txt
βββ printer_client/
β βββ client_node.py # Node to send job requests
β βββ CMakeLists.txt
βββ srv/
β βββ PrintJob.srv # Custom service definition
βββ launch/
β βββ printer_launch.py # Launch all nodes together (optional)
βββ package.xml
- Build the workspace
colcon build
source install/setup.bash
- Run the Printer Node
ros2 run printer_server printer_node
- Run the Client Node
ros2 run printer_client client_node --ros-args -p document_name:=myfile.pdf
- Monitor Status Topic
ros2 topic echo /print_status
ros2 service call /print_job printer_server/srv/PrintJob "{document_name: 'example.pdf'}"
Output:
requester: making request: printer_server.srv.PrintJob_Request(document_name='example.pdf')
response:
accepted: True
[INFO] [printer_node]: Received print job request: example.pdf
[INFO] [printer_node]: Job Queued: example.pdf
[INFO] [printer_node]: Started printing: example.pdf
[INFO] [printer_node]: Printing...
[INFO] [printer_node]: Printing...
[INFO] [printer_node]: Completed printing: example.pdf
ros2 topic echo /print_status
Output:
data: "Job Queued: example.pdf"
---
data: "Started printing: example.pdf"
---
data: "Completed printing: example.pdf"
ros2 service call /print_job printer_server/srv/PrintJob "{document_name: 'doc1.pdf'}"
ros2 service call /print_job printer_server/srv/PrintJob "{document_name: 'doc2.pdf'}"
ros2 service call /print_job printer_server/srv/PrintJob "{document_name: 'doc3.pdf'}"
Printer Node Output:
[INFO] [printer_node]: Received print job request: doc1.pdf
[INFO] [printer_node]: Job Queued: doc1.pdf
[INFO] [printer_node]: Received print job request: doc2.pdf
[INFO] [printer_node]: Job Queued: doc2.pdf
[INFO] [printer_node]: Received print job request: doc3.pdf
[INFO] [printer_node]: Job Queued: doc3.pdf
[INFO] [printer_node]: Started printing: doc1.pdf
[INFO] [printer_node]: Completed printing: doc1.pdf
[INFO] [printer_node]: Started printing: doc2.pdf
[INFO] [printer_node]: Completed printing: doc2.pdf
[INFO] [printer_node]: Started printing: doc3.pdf
[INFO] [printer_node]: Completed printing: doc3.pdf
- Add priority levels to jobs.
- Support for job cancellation.
- Save logs of completed jobs to a file.
- Create a simple frontend using
rqt
.
- ROS 2 service creation and usage
- Topic publishing and subscribing
- Managing internal state (queues) in nodes
- Designing ROS packages with modular architecture
- Containerizing ROS 2 projects for deployment
Note: You need to provide multiple docker files or single if you want to seperate server and client (optional) as you wish along with compose.yaml or bash script
Happy ROSing! π¨οΈπ€