[ros-users] pr2 and sr ethercat devices plugins

Kevin Watts watts at willowgarage.com
Mon Feb 7 17:08:55 UTC 2011


Yann-

First of all, the code API for pr2_ethercat_drivers and pr2_etherCAT is not
supported. We have documentation on the wiki and in the code FYI only. I
strongly recommend that you don't make any changes to the code in that
stack, since it may cause damage to your robot.

At startup, pr2_etherCAT detects all the slave devices, like WG005 and WG021
boards on the etherCAT chain. Then it loads an EthercatDevice plugin to
communicate with each device. The plugin type is determine by the type that
the device reports. "6805005" is a WG designation for a WG005 motor
controller board, which controls most of the motors in a PR2.

You can look in the code of pr2_ethercat_drivers for more details.

Kevin

On Mon, Feb 7, 2011 at 6:17 AM, Yann Sionneau <
yann.sionneau at telecom-sudparis.eu> wrote:

> Hello,
>
> I wonder how the binding is done between the different EtherCAT devices
> and the actual C++ class of the device.
>
> I've found it's been implemented as plugins, but I don't understand how
> it works though.
>
> For example in
> ros/cturtle/stacks/pr2_ethercat_drivers/ethercat_hardware/src/wg0x.cpp
> there is :
>
> PLUGINLIB_REGISTER_CLASS(6805005, WG05, EthercatDevice);
>
> Here the WG05 is a C++ class that extends the EthercatDevice class.
>
> And in
>
> ros/cturtle/stacks/pr2_ethercat_drivers/ethercat_hardware/ethercat_device_plugin.xml
> there is :
>
> <class name="6805005" type="WG05" base_class_type="EthercatDevice">
>
> So there seem to be a link between the number 6805005 (btw what is this
> number ?) and the class WG05 but I don't understand exactly how all of
> this work.
>
> Regarding the documentation I found there
> (http://www.ros.org/wiki/pluginlib) the first argument of
> PLUGINLIB_REGISTER_CLASS should be the name of the class ? or just some
> kind of a key ?
>
> Another question I have is : how does the discovery of all the devices
> in the Ethercat bus work ?
>
> How does ROS become aware of the fact that there are two devices of
> class WG05 and three of class WG021 for example ?
>
> I don't know if I am clear enough in my questions.
>
> Regards,
>
> --
> Yann Sionneau
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20110207/1980b5d4/attachment-0003.html>


More information about the ros-users mailing list