Ask Your Question
0

How to connect raspberry pi to motor drive with ros?

asked 2020-08-11 05:31:43 -0500

kyozho gravatar image

hi i'm new with ROS, i don't understand how raspberry pi can move to some point/goal with lidar. i have been searching but i don't have the answer yet. what i understand is the raspberry pi send signal to motor driver by GPIO. at this point i don't know how to implement this to ROS.

and yes i already knew about rviz to gmapping, scan laser.

please help thank you.

edit retag flag offensive close merge delete

Comments

1

Hello kyoyho

Would you please help me with control of motor driver with Rasberry? I can find nothing. Trying to control Lm298n OR IBT motor driver Can you help me ?

Šimon

simon.valkovic@gmai.com

Saimonko gravatar image Saimonko  ( 2020-09-15 06:25:03 -0500 )edit

hi, you can follow this step;

https://projects.raspberrypi.org/en/p...

kyozho gravatar image kyozho  ( 2020-09-16 22:22:13 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2020-08-11 06:01:52 -0500

bfdmetu gravatar image

Generally Ros users use arduino and motor shield to drive motor. I guess you should try this. In that way motors give better performance.

edit flag offensive delete link more

Comments

hi, thank you for your help. is there anyway without using those two things. i mean directly use GPIO instead ARDUINO

kyozho gravatar image kyozho  ( 2020-08-11 06:05:31 -0500 )edit
1

There are some motor driver for Pi. For example https://www.pololu.com/product/2753 ... Maybe this can works.. Dc motors need high voltage and current. If you dont use any motor driver, motors may damage Pi GPIO pins.

bfdmetu gravatar image bfdmetu  ( 2020-08-11 06:10:32 -0500 )edit

hi, thank you for keep following me up. yes i have my own motor driver and already plugged in with raspberry pi. right now i make my own simple code with python to move with w a s d. the GPIO it self i define as below;

BCM Pin
7 = forward left
8 = backward left
9 = forward right
10 = backward left

but this just as basic control with python.
i wanted to make a 2d goal with rviz so the robot can move in certain location in the map
Thank you

kyozho gravatar image kyozho  ( 2020-08-12 00:12:50 -0500 )edit

You have to learn gmapping and ros navigation.... In order to go a specific goal, firstly your car needs a map (gmapping). Then car needs encoder ( for odom informaiton).. And also laser scanner- lidar... At the final point your car needs to amcl - move_base package.... All of them connect each other. If one of is missing, your car doesn't go anywhere in RVİZ

bfdmetu gravatar image bfdmetu  ( 2020-08-20 03:47:43 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-08-11 05:31:43 -0500

Seen: 487 times

Last updated: Sep 15 '20