-
Notifications
You must be signed in to change notification settings - Fork 194
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
ControlBoardWrapper2 better state output port #208
Comments
Some thoughts : How the user is expected to access this new streamed state? I am a bit afraid of changing the streamed data structure just because the user have enabled the CB2_USE_ROS_MSG. This would mean that any client should check at runtime if the stateExt is "thrift" or "ros" and parse the message accordingly. Furthermore the message on the topic and the one on the port would still have to be different, because Yarp uses the degrees as on-wire angle unit of measure, while ROS JointState message uses radians. Still related to the ROS/YARP relationship: which kind of advantage we get by streaming joint names? I guess that is part of the semantics of the Yarp controlboard that the joint names are constant for the lifetime of the controlboard, and the user can already get the joint name using the appropriate method of the IAxisInfo interface. A nice feature would be having a configuration time parameter for enabling/disabling the broadcasting of the ros topic. I think of the following user case: a user does not normally use ROS at all, so he doesn't want the cbw to publish a ROS topic that is not going to be used. At some point he wants to run some kind of software that requires the ROS topic, it would be nice if he could enable the ROS topic publishing just by modifying the robotInterface configuration files (exploiting all the nice |
yes, no changes from the user perspective Please consider that this is aVERY VERY PRELIMINARY DRAFT!!! It is simply a proof of concept to see if and how this feature could work.
About Yarp/ROS: there is no need for the 2 structures to be the same, it was just a test.
The point of this test was answering the question:
It is true that the measurement units are different for the angles but maybe for the analog sensor wrappers broadcasting other types of data this can be useful (I mean... if we are going to support it ) Btw, let's move ROS related comments on #209. About how the YARP structure should be, I think adding the joint controlMode and Interaction mode could be useful, so the GUIs can stop flooding the network with get messages and the user will always have the most updated value. Do we need other data here? Currents? PID output? |
@barbalberto How the thing evolved? I saw that thrift and rosmsg data structures diverged, we are now going for distinct yarp and "ros" states? |
Done, this port is now the standard for yarp controlBoardWrapper2 |
As discussed few time ago I started to implement an output port with more info than just the encoders.
I used a thrift file to generate the class that will be sent through the port, a new port called stateExt:o (just dummy name).
The data sent now are
For now the data is filled with dummy names and numbers just to see if it works as expected.
I pushed the code on a branch called ControlBoardWrapper2_NewOutputPort.
The CMake flag CBW2_USE_YARP_THRIFT has to be enabled in order to compile the needed code and generate this new port.
This is a first implementation, more data can be added and I would like to use this redmine also to discuss what we think it is useful to put in this structure.
As explained in #209 the wrapper is now able to create a ROS topic by activating the CMake flag CB2_USE_ROS_MSG.
When both are enabled, the stateExt:o port will use the very same class generated from the .msg (instead of the one generated from the .thrift) for better compatibility between the 2 way of broadcasting data.
This is not mandatory, but I think it is a nice option to have.
If I remember correctly, we were also interested in receiving data from the motor side and for this we agreeded to have a separated wrapper boradcasting the stateExt data for the motor side (when activated by the user config file).
Will the structure of the 2 wrapper (joint side and motor side) be the same or shall be different?
What we would kile to have in those structures?
The text was updated successfully, but these errors were encountered: