loading a controller within a controller

103 views
Skip to first unread message

Gustavo Goretkin

unread,
Mar 30, 2015, 4:55:13 PM3/30/15
to ros-sig-ro...@googlegroups.com
I am currently on the PR2 groovy, so I am using the package pr2_controllers and pr2_controller_manager, but I hope that my question is not totally inappropriate for this list.

Is there anything that prevents a controller from using the controller_loader_ (as in https://github.com/ros-controls/ros_control/blob/3bde6882071ccaca3e954074875b93cac89ca725/controller_manager/include/controller_manager/controller_loader.h#L71) to itself load plugins? Is there any global state or anything that might complicate it?

I am trying it, and it's not working, and I just was wondering if anyone had any idea about this.

My purpose for doing this is to have a sort of meta-controller that switches between two existing controllers. If it turns out that this doesn't work, I will just compile-time link to the existing controllers, but it would be nice to be able to use the plugin infrastructure.

Adolfo Rodríguez Tsouroukdissian

unread,
Mar 31, 2015, 4:19:54 AM3/31/15
to Gustavo Goretkin, ros-sig-ro...@googlegroups.com
On Mon, Mar 30, 2015 at 10:55 PM, Gustavo Goretkin <gustavo....@gmail.com> wrote:
I am currently on the PR2 groovy, so I am using the package pr2_controllers and pr2_controller_manager, but I hope that my question is not totally inappropriate for this list.

Is there anything that prevents a controller from using the controller_loader_ (as in https://github.com/ros-controls/ros_control/blob/3bde6882071ccaca3e954074875b93cac89ca725/controller_manager/include/controller_manager/controller_loader.h#L71) to itself load plugins? Is there any global state or anything that might complicate it?

I can't speak for the pr2_controller_manager, but considering that ros_control is an evolution of it, it should be possible. Jon Bohren even went ahead and gave the idea a whirl back in early 2013. It did not go much further, as Jon then moved on to the conman project. Anyway, here's what he did:

https://github.com/jhu-lcsr-attic/composite_controllers

Adolfo.

 
I am trying it, and it's not working, and I just was wondering if anyone had any idea about this.

My purpose for doing this is to have a sort of meta-controller that switches between two existing controllers. If it turns out that this doesn't work, I will just compile-time link to the existing controllers, but it would be nice to be able to use the plugin infrastructure.

--
You received this message because you are subscribed to the Google Groups "ROS/Orocos Robot Control Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-co...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Adolfo Rodríguez Tsouroukdissian
Senior robotics engineer
adolfo.r...@pal-robotics.com
http://www.pal-robotics.com

PAL ROBOTICS S.L
c/ Pujades 77-79, 4º4ª
08005 Barcelona, Spain.
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
Skype: adolfo.pal-robotics
Facebook - Twitter - PAL Robotics YouTube Channel

AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden contener información privilegiada y/o confidencial que está dirigida exclusivamente a su destinatario. Si usted recibe este mensaje y no es el destinatario indicado, o el empleado encargado de su entrega a dicha persona, por favor, notifíquelo inmediatamente y remita el mensaje original a la dirección de correo electrónico indicada. Cualquier copia, uso o distribución no autorizados de esta comunicación queda estrictamente prohibida.

CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may contain confidential information which is privileged and intended only for the individual or entity to whom they are addressed.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of this e-mail and/or accompanying document(s) is strictly prohibited.  If you have received this e-mail in error, please immediately notify the sender at the above e-mail address.

jd22...@dal.ca

unread,
May 1, 2017, 1:32:53 PM5/1/17
to ROS/Orocos Robot Control Special Interest Group, gustavo....@gmail.com, adolfo.r...@pal-robotics.com
I am slighlty confused about the arrangement of PID mechanisms in my robot setup.

If i am using a controller of type: effort_controllers/JointPositionController, to control the steering of a wheel joint, I would have a PID loop in my ROS system (in the update method of the joint position controller) with the setpoint being a joint position and the actual current joint position being retreived from the joint_state_controller (which interfaces with the encoders and publishes joint states), and the output would be effort data, transmitted over the communication protocol (ROSserial, ROS-CanOpen, or EtherCAT, or etc..). The motor controller would receive the effort data. This is the point i am slighlty confused. When the motor controller hardware device receives a command to execute a certain effort (N.m) on the robot joint, does it also use a PID control mechanism here? In which the setpoint is effort, and the feedback is the actual current torque on the shaft, and the output of this PID would be voltage at the terminals of the electrically controller DC motor?

to summarize: ros-control effort_controllers/JointPositionController PID loop: setpoint: joint pos. feedback: joint state. output: requested joint torque sent to motor controller via bus.
                      motor controller PID Loop: setpoint: torque, feedback: torque, output: voltage to change the torque to acheive goal.

and so we have two PID loops happenin at the same time more or less, on different computing units, one on your main comp running ROS, the other on the embedded controller on your robot.

Secondly, but similarly:

If i am using a controller of type: effort_controllers/JointVelocityController, to control the speed of a wheel, I would have a PID loop in my ROS system (in the update method of the controller) with the setpoint being a joint velocity and the actual current joint velocity being retreived from the joint_state_controller (which interfaces with the encoders and publishes joint states), and the output would be effort data, transmitted. The motor controller would receive the effort data. When the motor controller hardware device receives a command to execute a certain effort (N.m) on the robot joint, does it also use a PID control mechanism here? In which the setpoint is effort, and the feedback is the actual current torque on the shaft, and the output of this PID would be voltage at the terminals of the electrically controller DC motor?


If this control scheme is correct, then i need motor controllers that are capable of performing Effort PID control loops, which entails being able to read the current torque on the motor shaft.

I appreciate any response to this question, and all the work done to create ros-controls.

Thank you,
Jad


On Tuesday, March 31, 2015 at 5:19:54 AM UTC-3, Adolfo Rodríguez Tsouroukdissian wrote:
On Mon, Mar 30, 2015 at 10:55 PM, Gustavo Goretkin <gustavo....@gmail.com> wrote:
I am currently on the PR2 groovy, so I am using the package pr2_controllers and pr2_controller_manager, but I hope that my question is not totally inappropriate for this list.

Is there anything that prevents a controller from using the controller_loader_ (as in https://github.com/ros-controls/ros_control/blob/3bde6882071ccaca3e954074875b93cac89ca725/controller_manager/include/controller_manager/controller_loader.h#L71) to itself load plugins? Is there any global state or anything that might complicate it?

I can't speak for the pr2_controller_manager, but considering that ros_control is an evolution of it, it should be possible. Jon Bohren even went ahead and gave the idea a whirl back in early 2013. It did not go much further, as Jon then moved on to the conman project. Anyway, here's what he did:

https://github.com/jhu-lcsr-attic/composite_controllers

Adolfo.

 
I am trying it, and it's not working, and I just was wondering if anyone had any idea about this.

My purpose for doing this is to have a sort of meta-controller that switches between two existing controllers. If it turns out that this doesn't work, I will just compile-time link to the existing controllers, but it would be nice to be able to use the plugin infrastructure.

--
You received this message because you are subscribed to the Google Groups "ROS/Orocos Robot Control Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-control+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Denis Štogl

unread,
May 2, 2017, 3:58:10 AM5/2/17
to ros-sig-ro...@googlegroups.com, jd22...@dal.ca

Hello Jad,

 

what you describe is standard control approach for electrical motors, where multiple controllers are connected into cascade. Check this animation (second diagram).

 

Generally speaking, you will almost always have some kind of cascade control in you robotics system. It is only important that "outer" control loop are slower than inner. In case of DC-Motor control from animation means that current-control loop is faster than speed control loop.

 

If you would like to control you robot I would recommend to use position or velocity controllers for the motor, because you want this controllers to just work at fast frequency. Than you use ROS for high-level control, like execution of the path.

 

I hope this helps you a bit.

 

Best regards,

 

Denis Štogl

> > PAL ROBOTICS S.L

> > c/ Pujades 77-79, 4º4ª

> > 08005 Barcelona, Spain.

> > Tel. +34.93.414.53.47

> > Fax.+34.93.209.11.09

> > Skype: adolfo.pal-robotics

> >

> > AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden

> > contener información privilegiada y/o confidencial que está dirigida

> > exclusivamente a su destinatario. Si usted recibe este mensaje y no es el

> > destinatario indicado, o el empleado encargado de su entrega a dicha

> > persona, por favor, notifíquelo inmediatamente y remita el mensaje

> > original

> > a la dirección de correo electrónico indicada. Cualquier copia, uso o

> > distribución no autorizados de esta comunicación queda estrictamente

> > prohibida.

> >

> > CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may

> > contain confidential information which is privileged and intended only for

> > the individual or entity to whom they are addressed. If you are not the

> > intended recipient, you are hereby notified that any disclosure, copying,

> > distribution or use of this e-mail and/or accompanying document(s) is

> > strictly prohibited. If you have received this e-mail in error, please

> > immediately notify the sender at the above e-mail address.

--

Karlsruhe Institute of Technology (KIT)

Faculty for Informatics

Institute for Anthropomatics and Robotics – Intelligent Process Control and Robotics Lab (IAR-IPR)

 

Denis Štogl, M.Sc.

Research Assistant

Intelligent Industrial Robotics Group (IIROB)

 

Engler-Bunte-Ring 8, Building 40.28, Room 002.1

76131 Karlsruhe

 

Phone: +49 721 608-46903

Fax: +49 721 608-47141

Email: denis...@kit.edu

 

rob.ipr.kit.edu

 

KIT – University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association

KIT-en.vcf
Reply all
Reply to author
Forward
0 new messages