Ask Your Question
0

imu and pid controller using rosserial

asked 2014-12-25 10:30:32 -0500

cty11002 gravatar image

It is just a general question. I'm new to this so from what I understand so far, we can only make one node for one arduino. So it is either a listener or talker. So I'm wondering if it is possible to write a pid controller code which uses data from an IMU, and use the controller in some functions(a function that makes robot move forward, a function that makes the robot spin, etc) and have arduino listen to a command, and it chooses which function to use based on that command?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-12-25 22:05:18 -0500

updated 2015-01-30 16:59:04 -0500

That is totally possible but you are right about it being only one node. However, rosserial can allow for multiple publishers (talkers) and subscribers (listeners) so it shouldn't be an issue. The maximum depends on the actual micro-controller. Are the IMU and controller on the Arduino?

edit flag offensive delete link more

Comments

Thanks for answering. Yes, so IMU and four motors are connected to the Arduino and the controller is written in the sketch. But the Arduino doesn't need to publish IMU data, it only needs to listen to the command by user (or some decision making algorithm) and change motor speed based on the command

cty11002 gravatar image cty11002  ( 2014-12-25 23:18:08 -0500 )edit

I've done something similar here if you want to take a look.

tonybaltovski gravatar image tonybaltovski  ( 2014-12-26 11:24:30 -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

Stats

Asked: 2014-12-25 10:30:32 -0500

Seen: 422 times

Last updated: Jan 30 '15