Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple joint velocity controller #51

Open
zweistein opened this issue Mar 7, 2016 · 2 comments
Open

Multiple joint velocity controller #51

zweistein opened this issue Mar 7, 2016 · 2 comments

Comments

@zweistein
Copy link

I would like to control the velocity of multiple MX 64 and 28 motors, by sanding the command signal for each motor in the same time. I found the implemented IO function def set_multi_speed(self, valueTuples), which is used for dual motor setup. I think this could also be used for more then two motors.

I'm struggling to figure out how to write a driver, which would handle all the motors velocity.
Is there already a controller like this, or can anyone point me in the right direction to create my own controller?

@arebgun
Copy link
Owner

arebgun commented Mar 7, 2016

You might want to look at joint_trajectory_action_controller which is designed to control multiple joints simultaneously.

@zweistein
Copy link
Author

Thank you for helping. I'm not so experienced with python, could you correct me if I see wrong some aspects of the trajectory action controller:

  • for each joint a joint_position_controller node is created;
  • what are actually stored in the self.port_to_io and self.port_to_joints attributes? If all my motors are on the same port, will this two attribute contain only one element {"my_only_port": [all my joints] }, {"my_only_port":"first_joint_controller.dxl_io"}?
  • the control tuple is sent from the trajectory action server within a loop:
 for port, vals in multi_packet.items():
                        self.port_to_io[port].set_multi_position(vals)

The port is referring to the serial port address (similarly as my previous question)? If I have all the motors on the same port the set_multi_position(vals) will be called only once?

I'm going to need some motor parameters and methods (e.g. RADIANS_PER_ENCODER_TICK, pd_rad_to_raw() ) for velocity control and this is in the self.joint_to_controller, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants