ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ROS API for PWM/Voltage Motor Control of Kobuki Turtlebot base

asked 2020-04-17 14:07:48 -0600

CarloK gravatar image

updated 2020-04-18 03:20:58 -0600

gvdhoorn gravatar image

I'm trying to do some system identification on my Kobuki platform, and I wish to input a PRBS (pseudorandom binary sequence) signal and plot that versus the obtained linear and angular velocities of the robot. Is that possible in ROS? If so, what topic should I publish to?

In other words, I'm not looking to input linear and angular velocities directly, but rather a control signal and see how that translates into linear/angular velocities.

Thank you!

Edit: I'm basically trying to control the Kobuki's motors through a PWM signal, and I was wondering if there's any ROS package for that (I did a somewhat quick search with no luck, but maybe I missed something).

edit retag flag offensive close merge delete

Comments

Can you clarify what "a control signal" means to you?

Because for the system you refer to (ie: a Kobuki Turtlebot platform), "linear and angular velocities" are actually its main control input.

The other main level of control abstraction would be the navigation goal I guess. That would be picked up by move_base and then used to plan a global path to the destination. That global path would then be handed over to the local planner which will essentially run a 2.5D position PID loop outputting linear and angular velocity to the base driver.

But I doubt you could send a PRBS to an action server. Or at least, not just any PRBS. It would have to be an actual nav goal.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-17 14:35:51 -0600 )edit

Additionally: I would suggest to be much more specific in your question. "input [..] control signal in ROS" doesn't really make sense. "ROS" in itself is nothing. It's like asking "Can I do flight performance tests on this bucket of bolts and nuts?". No, you can't. Only after using them to create an airplane that would be possible.

Only a set of nodes (from specific packages) form an application. And applications you can interact with.

In your question text you refer to a very specific set of ROS nodes (namely: the set of nodes which have been configured to control a Kobuki Turtlebot). It would be good to make the question title reflect this.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-17 14:40:09 -0600 )edit

Thank you for the quick reply!

Sorry for not phrasing my question correctly. Basically what I'm trying to know is if it's possible for me to control the Kobuki motors directly (send a PWM/voltage signal) rather than input known velocity messages (values). Maybe the Testsuite would help, I'll look into that.

Also, I saw that Dynamixel (the motor manufacturers) have an SDK. Is that compatible with the Kobuki/Turtlebot2 as it is with Turtlebot3?

Thanks again!

CarloK gravatar image CarloK  ( 2020-04-17 14:41:32 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-04-17 14:50:28 -0600

gvdhoorn gravatar image

Basically what I'm trying to know is if it's possible for me to control the Kobuki motors directly (send a PWM/voltage signal) rather than input known velocity messages (values)

That's a completely different question than I had understood from your question text.

I don't believe there are any ROS APIs available to do that.

The lowest part of the stack if kobuki_driver which interfaces with the firmware onboard the Kobuki's embedded controller. Afaik (but I could be wrong) there is no interface for direct control of individual motors.

edit flag offensive delete link more

Comments

Indeed, there's no easy way to do that besides building a robot from scratch and developing the drivers yourself, using SBC such as the Raspberry PI or microcontrollers (Arduino for example). I did however find a simulated version of the Kobuki base which allows PWM inputs into the left and right motors separately. I'm linking it in case someone ever needs something similar.

CarloK gravatar image CarloK  ( 2020-04-18 09:55:24 -0600 )edit

Indeed, there's no easy way to do that besides building a robot from scratch and developing the drivers yourself, using SBC such as the Raspberry PI or microcontrollers (Arduino for example)

Or changing the firmware of the Kobuki.

I don't know whether that is possible though.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-18 09:59:29 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-04-17 14:07:48 -0600

Seen: 512 times

Last updated: Apr 18 '20