Go Down

Topic: robotic (Read 929 times)previous topic - next topic

Dondor

Sep 25, 2016, 06:37 pm
How do i code for a robot which moves exactly 50cm in a straight line and then takes 60∘ clockwise turn and then moves 30cm in a straight line and then comes back to the initial point???plz help

SMM2

#1
Sep 25, 2016, 08:23 pm
What about making it a line-follower? Therefore, you could create the path you want your robot to take using for example some black electrical tape, and then you could have your robot follow that path.

Or does this robot have to be very precise?
"Success is not built on success. It's built on failure. It's built on frustration. Sometimes its built on catastrophe."

Dondor

#2
Sep 26, 2016, 05:50 am
It has to be precise. This is my project. I'm still new to this so I'm confused how to code it.

PaulS

#3
Sep 26, 2016, 12:15 pm
Quote
How do i code for a robot which moves exactly 50cm in a straight line
First, the Arduino has no way of knowing, unless you have sensors attached, that it is moving in a straight line.

Second, the Arduino has no way of knowing, unless you have sensors attached, that it has traveled 50 cm.

So, the simplest solution to your problem is to make the robot move on a rail, and put a wall at the 50 cm. mark.

Quote
and then takes 60∘ clockwise turn
How is the Arduino supposed to know that some other device has turned exactly 60 degrees?

MarkT

#4
Sep 26, 2016, 12:57 pm
How do i code for a robot which moves exactly 50cm in a straight line and then takes 60∘ clockwise turn and then moves 30cm in a straight line and then comes back to the initial point???plz help
Depends on the robot.  What capabilities does it have?  Is it designed for accurate dead-reckoning
like a turtlebot?
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Dondor

#5
Sep 26, 2016, 05:43 pmLast Edit: Sep 26, 2016, 05:52 pm by Dondor
What if we dont use sensors..??using just the motors and an arduino chip..??would it work
Can we can assume the distance it travelled be taken from  the no of rotations the wheel gives??

PaulS

#6
Sep 26, 2016, 06:21 pm
Quote
What if we dont use sensors..??
Then you haven't a hope in hell of going in a straight line, knowing when you have traveled some specific distance, OR turned some specific amount.

Quote
would it work
No.

Quote
Can we can assume the distance it travelled be taken from  the no of rotations the wheel gives??
No. You have no way of ensuring that there is no slippage. You have no way of ensuring that both wheels have exactly the same diameter. Without external sensors, you have no way of knowing how many rotations the wheel has turned.

Go Up