Skip to content

Commit

Permalink
Merge pull request #67 from atom-robotics-lab/revert-66-sani/wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
AaksharGarg authored Sep 9, 2024
2 parents 697504e + 2d35590 commit 1885ae4
Show file tree
Hide file tree
Showing 13 changed files with 386 additions and 327 deletions.
8 changes: 2 additions & 6 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,8 @@ Contents:

Socials <https://linktr.ee/a.t.o.m_robotics_lab>

.. toctree::
:maxdepth: 1
:titlesonly:

CAD Selection Task <markdown/selectiontask24/cad_sel.rst>
Submission Task <markdown/selectiontask24/submissions.rst>



Indices and tables
==================
Expand Down
1 change: 0 additions & 1 deletion markdown/ros/ros.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package management.
:maxdepth: 4
:hidden:


./ROS_installation/ROS_index.rst
./catkin_ws.rst
./package/package.rst
Expand Down
105 changes: 105 additions & 0 deletions markdown/selectiontask24/Electronics_selection.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
Electronics Selection Task 2023-2024
====================================
This year, we've introduced a three-tiered Electronic Selection Task. Here's a brief summary:


Challenge Levels
^^^^^^^^^^^^^^^^
The electronic selection task is divided into three levels, labeled from Level 0 to Level 2.
Each level presents its distinct set of challenges.
Whether you're a novice or an experienced enthusiast, there's something here for everyone.

Scoring System
^^^^^^^^^^^^^^^
To add an extra layer of excitement, each task within these levels carries a specific point value mentioned alongside
the problem statement. Your performance will determine your score, and points will be awarded accordingly.

Qualification Criteria
^^^^^^^^^^^^^^^^^^^^^^^
To progress to the next stage, which is the interview phase, you must accumulate a minimum of 7 points in total. These
points will be awarded after evaluating your submissions. Therefore, ensure you put your best foot forward for a chance to advance!




Level 0 - Getting Started
--------------------------

Level 0 serves as the foundation and includes tasks such as:

1. Blinking an LED with Arduino 1 point
2. Scrolling text on an OLED display 1 point
3. Playing a tune on a buzzer 1 point
4. Adjusting LED intensity using a potentiometer 1 point
5. Controlling a servo motor 1 point


.. Note:: You will earn 1 point for each successfully completed task in Level 0. It's the ideal starting point for
those new to the world of electronics!


Level 1 - Advanced Challenges
-----------------------------
Level 1 elevates the complexity with more intricate problems and higher point allocations. Stay tuned for the list of tasks!

Task Description:

1. Light up six LEDs using only three GPIO pins of Arduino/ESP32/Microcontroller. 5 pts

Expected Output
---------------
`video link <https://www.youtube.com/watch?v=iGsrljodarg>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. raw:: html

<center><iframe width="560" height="315" src="https://www.youtube.com/embed/iGsrljodarg?si=yT71m29KUxcqli4C" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe></center><br>


2. Analyze the provided code and submit the output as demonstrated in the video. 5 pts


Sample Code Snippets
--------------------

`Code link <https://drive.google.com/file/d/1ceXvCn3g2x0-FCjp3gmtyL73ffSguHz-/view?usp=sharing>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Video Reference
----------------
.. raw:: html

<center><iframe width="560" height="315" src="https://www.youtube.com/embed/xbvqrmQqz08?si=lsaT3T-PH7GDGIv3" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe></center>

Level 2 - Expert Territory
--------------------------
The ultimate challenge! Level 2 will test even the most seasoned electronic enthusiasts. Prepare for some mind-bending tasks and
substantial point rewards.

Task Description
----------------
PCB Designing - Create a schematic, perform routing, and submit a Gerber file. Additionally, provide screenshots of the
schematics and a text file explaining your approach and detailing the schematic. 10 pts


Problem Statement
-----------------
Create a basic PCB capable of accepting battery input and producing different output voltages - 5V and 12V. Determine the
track size to handle output currents of up to 2 Amps accordingly.

.. Warning::
The **Deadline** for completing the task: **16th October, 2023**

submissions
+++++++++++
You can submit the video of the task by performing it on hardware, along with the code. If, in case, you don't have the hardware,
you can use online simulators like TinkerCad and screen record your task, then submit it. In addition to judging the output of
the task, we will also consider the effort you have put into performing this task. Even if you are not able to complete the task,
you may still submit it. Points will be allocated accordingly.

`Google Form link <https://forms.gle/4c7ep5HaYt8mJY7i9>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


.. Warning::
The **Deadline** for completing the task: **16th October, 2023**
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ROS Selection Task 2024-2025
ROS Selection Task 2023-2024
============================


Problem statement
-----------------

- The objective of the task is to move the turtle inside the turtlesim
window in a vertical Candy shape
window in a vertical Z shape

- To acheive this task you are supposed to create a node named
/node_turtle_move within a python script,
Expand All @@ -23,30 +23,27 @@ Problem statement
we think a week time is enough so you guys can give your exams freely
and manage your time in order to complete the task

.. figure:: ros.jpg

.. Note:: All the resources to complete the said task are provided in
the ROS section of ATOM WIKI. So make sure to check it out if you are
new to ROS2.
new to ROS.

.. Warning::
The **Deadline** for completing the task is **15th October, 2024**.
The **Deadline** for completing the task: **16th October, 2023**

Expected Output
---------------
`video link <https://www.youtube.com/shorts/R6udlXtyplk>`__

.. raw:: html

<center><iframe width="560" height="315" src="https://www.youtube.com/embed/R6udlXtyplk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></center><br>
<center><iframe width="560" height="315" src="https://www.youtube.com/embed/ja-QRX4gu6E" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></center><br>


.. caution:: THE Candy SHOULD BE VERTICAL .
.. Note:: THE Z SHOULD BE VERTICAL .

Hints
-----

- The turtle needs to move in a vertical Candy shape .
- The turtle needs to move in a vertical ‘Z’ shape .

- You can refer `POSE <https://docs.ros.org/en/noetic/api/geometry_msgs/html/msg/Pose.html>`__ to learn more about pose function.

Expand All @@ -65,75 +62,55 @@ while bot's distance is less than 6.

.. code-block:: python
#!/usr/bin/env python3
#! /usr/bin/env python3
import rclpy
from rclpy.node import Node
import rospy
from geometry_msgs.msg import Twist
from turtlesim.msg import Pose
my_X = 0.0
my_Y = 0.0
x_dist = 8.0
# Subscriber callback that gives the position of the turtle (x & y)
def pose_callback(pose):
my_X = 0
my_Y = 0
x_dist = 6
# Subscriber Callback that gives position of the turtle (x & y)
def pose_callback(pose):
global my_X, my_Y
rospy.loginfo("Robot X = %f: Robot Y=%f\n",pose.x,pose.y)
my_X = pose.x
my_Y = pose.y
node.get_logger().info(f"Robot X = {pose.x}: Robot Y = {pose.y}")
class MoveTurtle(Node):
def __init__(self, lin_vel):
super().__init__('move_turtle')
self.publisher_ = self.create_publisher(Twist, '/turtle1/cmd_vel', 10)
self.subscriber_ = self.create_subscription(Pose, '/turtle1/pose', pose_callback, 10)
self.lin_vel = lin_vel
self.timer = self.create_timer(0.1, self.move_callback) # 10hz
self.vel_msg = Twist()
def move_callback(self):
global my_X, x_dist
# Set the linear velocity
self.vel_msg.linear.x = self.lin_vel
self.vel_msg.linear.y = 0.0 # Ensure this is a float
self.vel_msg.linear.z = 0.0 # Ensure this is a float
self.vel_msg.angular.x = 0.0
self.vel_msg.angular.y = 0.0
self.vel_msg.angular.z = 0.0
self.get_logger().info(f"Linear Vel = {self.lin_vel}")
def move_turtle(lin_vel):
global my_X
rospy.init_node('move_turtle', anonymous=True)
pub = rospy.Publisher('/turtle1/cmd_vel', Twist, queue_size=10)
rospy.Subscriber('/turtle1/pose',Pose, pose_callback)
rate = rospy.Rate(10) # 10hz
vel = Twist()
while not rospy.is_shutdown():
vel.linear.x = lin_vel
vel.linear.y = 0
vel.linear.z = 0
vel.angular.x = 0
vel.angular.y = 0
vel.angular.z = 0
rospy.loginfo("Linear Vel = %f: ", lin_vel)
# Stop the turtle when it reaches x_dist
if my_X >= x_dist:
self.get_logger().info("Turtle Reached destination")
self.get_logger().warn("Stopping Turtle")
# Set the velocity to zero to stop the turtle
self.vel_msg.linear.x = 0.0
self.publisher_.publish(self.vel_msg)
rclpy.shutdown()
else:
self.publisher_.publish(self.vel_msg)
def main(args=None):
rclpy.init(args=args)
lin_vel = 2.0 # Set linear velocity
global node
node = MoveTurtle(lin_vel)
try:
rclpy.spin(node)
except KeyboardInterrupt:
pass
finally:
node.destroy_node()
rclpy.shutdown()
if __name__ == '__main__':
main()
if(x_dist < my_X ):
rospy.loginfo("Turtle Reached destination")
rospy.logwarn("Stopping Turtle")
break
pub.publish(vel)
rate.sleep()
move_turtle(2.0)
Output video
-----------------------
Expand Down Expand Up @@ -167,23 +144,27 @@ Follow the instructions given below to get started with the task.

.. code:: shell
cd ~/turtle_ws
colcon_build
source install/setup.bash
cd ~/catkin_ws
catkin_make
source devel/setup.bash
chmod +x ~/catkin_ws/src/selection_task/scripts/node_turtle_move.py
- You can either run them in separate terminals or
- Before executing make sure that roscore is running along with
turtlesim_node. You can either run them in separate terminals or
simply create a selection_task.launch file inside the
``~/turtle_ws/src/selection_task/launch/`` folder. Launch file can
``~/catkin_ws/src/selection_task/launch/`` folder. Launch file can
run multiple nodes unlike a python/cpp script. Run the launch file,
enter, This should run three processes in parallel.

- roscore

- turtlesim_node

- node_turtle_move.py

.. seealso::
Please refer to the tutorials and resouces given in the wiki or visit
the official `ROSWIKI <http://wiki.ros.org/Documentation>`__ if you
need help with anything regarding ROS2.
need help with anything regarding ROS.

Head over to `Submissions <./submissions.rst>`__ to submit your work

Binary file removed markdown/selectiontask24/Task1.png
Binary file not shown.
Loading

0 comments on commit 1885ae4

Please sign in to comment.