allenh1 / p2os

P2OS ROS driver for Groovy and later.
http://wiki.ros.org/p2os-purdue
27 stars 38 forks source link

Use p2os to control motors individually #42

Open driverac10 opened 8 years ago

driverac10 commented 8 years ago

Hi,

I'm using a Pioneer3 AT, but my command order is not the topic /cmd_vel. I need to send the velocities to both the right and left wheels rather than their result on the global movement of the robot.

After reading carefully the code, I understand a serial-port communication is used to give the motors the commands needed.

However, as it is referenced in line 228 on p2os.cc only a "non-direct wheel control" is implemented (through the /cmd_vel topic). Besides, in the same file this implementation is limited by brackets (I mean these: {...}), from lines 227 to 267, which could mean the other option (what I need, the "direct wheel control") used to be implemented as well. In addition, there is a parameter: "direct_wheel_vel_control" declared as an atribute of the P2OSNode class in line 171 which is never initializated.

Thus, my question is: Am I right, and both control schemes were implemented in a previous version of the package? In this case, where could I find the "direct_wheel_vel_control"? And if I'm wrong, there is at least an afordable way to implement this kind of control using this package?

Thanks!

David

allenh1 commented 7 years ago

So I believe that direct wheel control doesn't make much sense in ROS (because of the way the cmd_vel topic works). I think that control scheme is residual from the old player/stage driver, but I'll ask Brian next time I see him.