M.Tech Question Bank
M.Tech Question Bank
rust
Copy code
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu
$(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-
latest.list'
o Install the ROS Indigo desktop full package for complete tools and libraries
using:
sudo apt-get install ros-indigo-desktop-full.
o Initialize rosdep, which resolves dependencies for ROS packages:
csharp
Copy code
sudo rosdep init
rosdep update
bash
Copy code
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
source ~/.bashrc
Unit 2: Designing ChefBot Hardware
arduino
Copy code
sudo apt-get install build-essential cmake git libgtk2.0-dev
bash
Copy code
git clone https://github.com/opencv/opencv.git
o Build OpenCV:
▪ Create a build directory: mkdir build && cd build.
▪ Configure the build using CMake: cmake ...
▪ Compile the source code: make -j$(nproc).
o Install OpenCV: Use the command: sudo make install.
o Verify installation by importing OpenCV in Python: import cv2.
8. Q: Describe how to program the Kinect sensor using ROS and Python.
A:
o Install Kinect drivers using OpenNI.
o Launch Kinect nodes in ROS for communication with the sensor.
o Use cv_bridge to convert ROS image messages to OpenCV-compatible
formats.
o Write Python scripts to process images and depth data from the Kinect sensor.
o Use PCL (Point Cloud Library) to process 3D data for tasks like object
recognition and environment mapping.
Unit 5: Applying Artificial Intelligence to ChefBot Using Python
11. Q: How does ChefBot perform SLAM using Kinect and ROS?
A:
o SLAM (Simultaneous Localization and Mapping): A process to map the
environment while localizing the robot.
o Kinect captures depth and RGB data for mapping.
o ROS processes this data using SLAM algorithms like Gmapping or
Cartographer.
o The map generated helps ChefBot navigate autonomously in real-time.
12. Q: Describe the process of capturing and displaying images using Python and
OpenCV.
A:
o Import OpenCV: import cv2.
o Load an image: image = cv2.imread('image.jpg').
o Display the image using: cv2.imshow('Window', image).
o Capture video from a webcam using: cv2.VideoCapture(0).
o Process frames in real-time for tasks like object detection or motion tracking.