Go Down

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

Dondor

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

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

It has to be precise. This is my project. I'm still new to this so I'm confused how to code it.

PaulS

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?

The art of getting good answers lies in asking good questions.

MarkT

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 will NOT respond to personal messages, I WILL delete them, use the forum please ]

Dondor

#5
Sep 26, 2016, 05:43 pm Last 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

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.
The art of getting good answers lies in asking good questions.

Go Up