ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

imu and pid controller using rosserial

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

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

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

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

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


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 -0600 )edit

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

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


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

Seen: 516 times

Last updated: Jan 30 '15