In the heart of a lush Greenland landscape, a perplexing enigma etched itself into the Earth's surface thousands of years ago. The Nasca Lines, colossal geoglyphs spanning vast stretches of green land, have confounded archaeologists and historians for centuries. These monumental creations – intricate animal figures, geometric designs, and intricate shapes – remain a testament to a civilization long past. Yet, their true purpose and the methods behind their construction continue to elude us.
Were the Nasca Lines celestial calendars, guiding the ancient Nasca people in their agricultural endeavors? Were they sacred pathways for religious rituals? Or did they serve as messages for extraterrestrial beings đź‘˝? Theories abound, yet the mystery remains, challenging our understanding of ancient cultures and their relationship with the cosmos.
- Introduction
- Supported Operating System
- Prerequisites
- Installation
- Stage 1 - Simulation Tasks
- Stage 2 - Hardware Tasks
The project is currently designed and tested for Linux-based operating systems. For optimal compatibility and performance, it is recommended to use Ubuntu. The project has been thoroughly tested and built on the Ubuntu platform.
To ensure a smooth installation process, please verify the following prerequisites:
-
Docker Installation: Ensure Docker is installed on your local machine. For installation instructions, refer to the official Docker documentation.
-
Docker Images: Make sure the following Docker images are available on your local machine:
- osrf/ros:humble-desktop
- microros/micro-ros-agent:humble
By meeting these prerequisites, you will be prepared for a seamless installation experience.
To install and set up the project on your local machine, run the following commands in your terminal:
# Clone the Repository
git clone
# Navigate to the Project Directory
cd
# Build Docker Image for Hologlyph Bots
docker build -t hologlyph_bots:latest .
To utilize this task, follow these steps:
# Set up X11 Forwarding:
xhost + local:docker
# Start Docker Container:
docker-compose up
# Enter Container and Execute Commands:
# Terminal 1: Run turtlesim node
ros2 run turtlesim turtlesim_node
# Terminal 2: Run task_1a_2977 node
ros2 run hb_task_1a task_1a_2977
To utilize this task, follow these steps:
# Set up X11 Forwarding:
xhost + local:docker
# Start Docker Container:
docker-compose up
# Enter Container and Execute Commands:
# Terminal 1: Run Gazebo World World
ros2 launch hb_task_1b gazebo.launch.py
# Terminal 2: Run Task 1B Controller
ros2 launch hb_task_1b hb_task1b.launch.py
To utilize this task, follow these steps:
# Set up X11 Forwarding:
xhost + local:docker
# Start Docker Container:
docker-compose up
# Enter Container and Execute Commands:
# Terminal 1: Run Gazebo World World
ros2 launch hb_task2a task2a.launch.py
# Terminal 2: Run Task 2A Controller
ros2 launch hb_task2a controller.launch.py
To utilize this task, follow these steps:
# Set up X11 Forwarding:
xhost + local:docker
# Start Docker Container:
docker-compose up
# Enter Container and Execute Commands:
# Terminal 1: Run Gazebo World World
ros2 launch hb_task2b task2b.launch.py
# Terminal 2: Run Task 2B Controller
ros2 launch hb_task2b controller.launch.py
This task involves hardware testing and areana priniting
Raw image from the USB camera has what is known as the fish-eye effect. We need to remove this fish-eye effect to effectively detect Aruco markers in further tasks. Hence it is necessary to calibrate our USB camera.
- Callibrate: Follow up these commands to get xml file for camera parameters which will be used to restore the distored image through fisheye camera.
Note: Before starting the callibration replace the contents of /opt/ros/humble/share/usb_cam/config/params_1.yaml to the following yaml code block:
/**:
ros__parameters:
video_device: "/dev/video2"
framerate: 30.0
io_method: "mmap"
frame_id: "camera"
pixel_format: "yuyv2rgb" # see usb_cam/supported_formats for list of supported formats
av_device_format: "YUV422P"
image_width: 640
image_height: 480
camera_name: "narrow_stereo"
camera_info_url: "package://usb_cam/config/camera_info.yaml"
brightness: -1
contrast: -1
saturation: -1
sharpness: -1
gain: -1
auto_white_balance: true
white_balance: 4000
autoexposure: true
exposure: 100
autofocus: false
focus: -1
Note: Before starting the camera replace the contents of /opt/ros/humble/share/usb_cam/launch/camera_config.py to the following code block:
from pathlib import Path
from typing import List, Optional
from ament_index_python.packages import get_package_share_directory
from pydantic import BaseModel, root_validator, validator
USB_CAM_DIR = get_package_share_directory('usb_cam')
class CameraConfig(BaseModel):
name: str = 'camera1'
param_path: Path = Path(USB_CAM_DIR, 'config', 'params_1.yaml')
remappings: Optional[List]
namespace: Optional[str]
@validator('param_path')
def validate_param_path(cls, value):
if value and not value.exists():
raise FileNotFoundError(f'Could not find parameter file: {value}')
return value
@root_validator
def validate_root(cls, values):
name = values.get('name')
remappings = values.get('remappings')
if name and not remappings:
# Automatically set remappings if name is set
remappings = [
('image_raw', '/image_raw'),
('image_raw/compressed', '/image_compressed'),
('image_raw/compressedDepth', '/compressedDepth'),
('image_raw/theora', '/image_raw/theora'),
('camera_info', '/camera_info'),
]
values['remappings'] = remappings
return values
Now Start Callibration:
# Set up X11 Forwarding:
xhost + local:docker
# Start Docker Container:
docker-compose up
# Start the Camera Node, You should see /camera1/image_raw and /camera1/camera_info when you run ros2 topic list
ros2 launch usb_cam camera.launch.py
# Open Callibration Tool
ros2 run camera_calibration cameracalibrator --size 8x6 --square 0.02 --ros-args -r image:=/camera/image_raw -p camera:=/camera
Note: Replace the contents of /opt/ros/humble/share/usb_cam/config/camera_info.yaml with the new config file we recieved from callibration tool.
# Start Camera
ros2 launch usb_cam camera.launch.py
# Undistort Image
ros2 launch image_proc image_proc.launch.py
# Run Micro Ros Agent from docker
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble udp4 --port 8888
# Run Code Regarding Shapes
python3 hardware/hb_task4/task_4c__Open_Loop_Control/circle.py # Circle
python3 hardware/hb_task4/task_4c__Open_Loop_Control/sqaure.py # Square
python3 hardware/hb_task4/task_4c__Open_Loop_Control/triangle.py # Triangle
# Run Micro Ros Agent from docker
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble udp4 --port 8888
# Run Camera Feedback
python3 hardware/hb_task4/task_4b__Camera_Callibration/feedback.py
# Run code for taking robots to start position
python3 hardware/hb_task5/task_5a__ReachStart.py
# Run Controller
python3 hardware/hb_task5/task_5a__ClosedLoopControl.pu
Watch our demonstration video on YouTube.
# Run Micro Ros Agent from docker
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble udp4 --port 8888
# Run Camera Feedback
python3 hardware/hb_task4/task_4b__Camera_Callibration/feedback.py
# Run code for taking robots to start position
python3 hardware/hb_task5/task_5b__ReachStart.py
# Run Controller
python3 hardware/hb_task5/task_5b__MiniThemeRun.py
Watch our demonstration video on YouTube.
# Run Micro Ros Agent from docker
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble udp4 --port 8888
# Run Camera Feedback
python3 hardware/hb_task4/task_4b__Camera_Callibration/feedback.py
# Run code for taking robots to start position
python3 hardware/hb_task6/reachGraderStart.py
# Run Controller
python3 hardware/hb_task6/bot_controls.py
Watch our demonstration video on YouTube.
# Run Micro Ros Agent from docker
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble udp4 --port 8888
# Run Camera Feedback
python3 hardware/hb_task4/task_4b__Camera_Callibration/feedback.py
# Run code for taking robots to start position
python3 hardware/hb_task6/reachGraderStart.py
# Run Controller
python3 hardware/hb_task6/bot_controls.py -image_mode=true
Watch our demonstration video on YouTube.