0% found this document useful (0 votes)
161 views8 pages

unit 3 edt2

The document outlines a practical experiment for designing a collision avoidance robot using Coppeliasim, focusing on obstacle detection and navigation in a multi-obstacle environment. Key concepts include sensor utilization, real-time response, and algorithm development for effective movement control. The results indicate successful navigation with recommendations for optimization and advanced techniques to enhance performance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views8 pages

unit 3 edt2

The document outlines a practical experiment for designing a collision avoidance robot using Coppeliasim, focusing on obstacle detection and navigation in a multi-obstacle environment. Key concepts include sensor utilization, real-time response, and algorithm development for effective movement control. The results indicate successful navigation with recommendations for optimization and advanced techniques to enhance performance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

University Institute of Engineering

Department of Computer Science & Engineering

Experiment: 3.1

Student Name: Omika Gupta UID: 24BAI70535


Branch: Computer Science & Engineering Section/Group:406 A
Semester: 02
Subject Name: EMERGING & DISRUPTIVE TECHNOLOGIES WORKSHOP (IOT,
AR-VR, ROBOTICS)

Subject Code: CONT_24ECP-103

1. Aim of the practical:: Design a collision avoidance robot in multi obstacle-based environment

2. Tool Used: Coppeliasim.

3. Basic Concept/ Command Description:

· sim.getObjectHandle() – Retrieves handles for the robot, sensors, and motors.

· sim.readProximitySensor() – Reads distance data from sensors to detect obstacles.

· sim.setJointTargetVelocity() – Controls wheel speed for movement and turning.

· if condition – Checks sensor data to determine obstacle proximity.

· while loop – Continuously monitors sensor input to dynamically adjust navigation.

4. Code:
CODE FOR BUBBLE ROB:

function speedChange_callback(ui,id,newVal)

speed=minMaxSpeed[1]+(minMaxSpeed[2]-minMaxSpeed[1])*newVal/100
University Institute of Engineering
Department of Computer Science & Engineering

end

function sysCall_init()

-- This is executed exactly once, the first time this script is executed

bubbleRobBase=sim.getObject('.') -- this is bubbleRob's handle

leftMotor=sim.getObject("./leftMotor") -- Handle of the left motor

rightMotor=sim.getObject("./rightMotor") -- Handle of the right motor

noseSensor=sim.getObject("./sensingNose") -- Handle of the proximity sensor

minMaxSpeed={50*math.pi/180,300*math.pi/180} -- Min and max speeds for each motor

backUntilTime=-1 -- Tells whether bubbleRob is in forward or backward mode

robotCollection=sim.createCollection(0)

sim.addItemToCollection(robotCollection,sim.handle_tree,bubbleRobBase,0)

distanceSegment=sim.addDrawingObject(sim.drawing_lines,4,0,-1,1,{0,1,0})

robotTrace=sim.addDrawingObject(sim.drawing_linestrip+sim.drawing_cyclic,2,0,-
1,200,{1,1,0},nil,nil,{1,1,0})

graph=sim.getObject('./graph')

distStream=sim.addGraphStream(graph,'bubbleRob clearance','m',0,{1,0,0})

-- Create the custom UI:

xml = '<ui title="'..sim.getObjectAlias(bubbleRobBase,1)..' speed" closeable="false"


resizeable="false" activate="false">'..[[

<hslider minimum="0" maximum="100" onchange="speedChange_callback" id="1"/>


University Institute of Engineering
Department of Computer Science & Engineering

<label text="" style="* {margin-left: 300px;}"/>

</ui>

]]

ui=simUI.create(xml)

speed=(minMaxSpeed[1]+minMaxSpeed[2])*0.5

simUI.setSliderValue(ui,1,100*(speed-minMaxSpeed[1])/(minMaxSpeed[2]-
minMaxSpeed[1]))

end

function sysCall_sensing()

local result,distData=sim.checkDistance(robotCollection,sim.handle_all)

if result>0 then

sim.addDrawingObjectItem(distanceSegment,nil)

sim.addDrawingObjectItem(distanceSegment,distData)

sim.setGraphStreamValue(graph,distStream,distData[7])

end

local p=sim.getObjectPosition(bubbleRobBase,-1)

sim.addDrawingObjectItem(robotTrace,p)

end

function sysCall_actuation()
University Institute of Engineering
Department of Computer Science & Engineering

result=sim.readProximitySensor(noseSensor) -- Read the proximity sensor

-- If we detected something, we set the backward mode:

if (result>0) then backUntilTime=sim.getSimulationTime()+4 end

if (backUntilTime<sim.getSimulationTime()) then

-- When in forward mode, we simply move forward at the desired speed

sim.setJointTargetVelocity(leftMotor,speed)

sim.setJointTargetVelocity(rightMotor,speed)

else

-- When in backward mode, we simply backup in a curve at reduced speed

sim.setJointTargetVelocity(leftMotor,-speed/2)

sim.setJointTargetVelocity(rightMotor,-speed/8)

end

end

function sysCall_cleanup()

simUI.destroy(ui)

end

CODE FOR VISION SENSOR:


University Institute of Engineering
Department of Computer Science & Engineering

function sysCall_vision(inData)

simVision.sensorImgToWorkImg(inData.handle) -- copy the vision sensor image to the work


image

simVision.edgeDetectionOnWorkImg(inData.handle,0.2) -- perform edge detection on the


work image

simVision.workImgToSensorImg(inData.handle) -- copy the work image to the vision


sensor image buffer

end

function sysCall_init()

end

5. Observations, Simulation Screen Shots and Discussions:

· Effective Obstacle Detection – The robot successfully detects obstacles using proximity
sensors and adjusts its path accordingly.

· Real-Time Response – Quick sensor readings enable the robot to react immediately, preventing
collisions.

· Path Optimization – The robot efficiently navigates around obstacles but may require fine-
tuning for smoother turns.

· Environmental Sensitivity – Sensor performance may be affected by surface material, object


reflectivity, or environmental lighting.

· Algorithm Efficiency – Implementing advanced techniques like PID control or A* path


planning can enhance movement accuracy and decision-making.
University Institute of Engineering
Department of Computer Science & Engineering

6. Result and Summary:


University Institute of Engineering
Department of Computer Science & Engineering

The collision avoidance robot successfully navigates a multi-obstacle environment using


proximity sensors and adaptive movement control. Real-time obstacle detection ensures smooth
and efficient path adjustments. Performance improves with optimized sensor placement and
control algorithms. Fine-tuning response logic enhances accuracy, making the robot reliable for
autonomous navigation tasks.

7. Additional Creative Inputs (If Any):

Learning outcomes (What I have learnt):

1. Sensor Utilization – Understanding how proximity sensors detect obstacles and influence
movement decisions.
2. Autonomous Navigation – Learning to program robots for real-time path adjustments in
dynamic environments.
3. Algorithm Development – Implementing logic-based obstacle avoidance strategies like
conditional checks and path planning.
4. Simulation Mastery – Gaining hands-on experience with CoppeliaSim commands for sensor
reading and motor control.
5. Optimization Techniques – Exploring advanced methods like PID control or machine
learning for improved obstacle avoidance.

Evaluation Grid:

Sr. No. Parameters Marks Obtained Maximum


Marks
1. Student Performance 12
(Conduct of experiment)
2. Viva Voce 10
3. Submission of Work Sheet 8
(Record)
Signature of Faculty (with Date): Total Marks 30
Obtained:
University Institute of Engineering
Department of Computer Science & Engineering

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy