-
Notifications
You must be signed in to change notification settings - Fork 23
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
Do we need a FlexibleJointState message? #17
Comments
Converted this into its own issue after discussing this with @bmagyar. If this is an RTFM, then I'd be happy to do so. |
Hello everyone, I've been reading the design discussions for a couple of days trying to connect the concepts of ROS2 and ros_control to see if I can contribute with opinions and suggestions at first. I am not so familiar with ROS2 yet, but I use ros_control for a while. Regarding the FlexibleJointState message, I think it is trying to fulfill two objectives that can be separated: 1- Avoid exchange of unused data (e.g. enforce provide effort when it is not available) In my opinion, this is a minor problem, but I think possible ways to avoid this would be:
2- Support different hardware interfaces: Looking at the "controller_execution_management.md" draft, I feel it is trying to define a centralized way to exchange data between the Controllers and the RobotHW. The idea sounds to create a key-value map for all hardware resources grouped by hardware interfaces (by the way, the example in the "flexible_joint_states_msg.md" draft seems to mix the concept of resource/joint names and hardware interfaces). A centralized solution is a possible option, but I think it can enforce strong constraints. Considering the scenario of exchanging data using messages (I think I am missing ROS2 concepts here, please correct me if I'm wrong), I suggest mapping resources and hardware interfaces to messages, like:
|
@gavanderhoorn I don't know exactly if you refer to a specific article here (either the flexible joint state message or the execution management or neither) To take a step back here, the goal of all this is to introduce a more flexible way of composing complex, yet modular controller setups. The initial motivation was to get rid of a fixed triplet of a state in such There are currently two approaches I am thinking of:
I essentially opted for the second approach, because of two technical reasons: 1. Deterministic Execution 2. Only publish what you need In general, I think also what @mateus-amarante mentioned, the map I have in mind is really only to bridge the gap on how to cycle information from the hardware through all controllers. I don't see it much as a specific ROS message in the form of generated from a I would love to re-use something like What we could do in the meantime though is to design an API which adheres to |
Thanks for opening this discussion.
In interest of time and moving forward with the project however, the lack of this message is a major blocker as there are several follow-up designs depending on it. I will go ahead with it but as I said, the implementation of it could be swapped out for something else (msg vs native struct, etc). |
As a user, I think that the FlexibleJointState with the flat structure is a welcome and a needed addition. If someone wants to extend the message and that it is not inside the set of constants how is it done ? |
@olivier-stasse: The plan is actually not to provide a fixed set of constants, but one give a proposal for the most common one. This would be like "standard" constants in ros2-c. On exactly how you would handle this we will provide in |
@olivier-stasse I've tried to raise the issues of standardizing the Value Identifier Convention (VIC) in the Flexible Joint State Message design doc in section name-lookup. Yet, I am very well aware of your concern. as @destogl mentioned, having a set of predefined and exclusive constants might not necessarily work. That's the same as extending the existing joint state message with more fields. I guess I should make this clearer in the design doc, but I feel a nice middle ground between arbitrary strings as VICs and hardcoded constants could be established in the URDF. <transmission name="electric_motor1">
<type>actuator_interface</type>
<joint name="electric_motor_joint1">
<output_hardware_interface>CurrentInterface</output_hardware_interface>
<input_hardware_interface>EffortInterface</input_hardware_interface>
</joint>
</transmission>
<transmission name="imu_1">
<type>sensor_interface</type>
<joint name="imu_fixed_joint1">
<output_hardware_interface>FloatArrayInterface</output_hardware_interface>
</joint>
</transmission> The transmission parser could then generate the VICs from the URDF and populate the robot interface accordingly. That way the VICs are somehow centralized parsed and generated without much ambiguity and the only place to define them is the URDF. @gavanderhoorn I haven't heard back from you. Are there any comments or follow-up questions from your side here? I am not sure if your points were addressed here. |
@bmagyar Thanks for the feedback 👍 to have the constants in the URDF or XML file rather than header constants. I am somewhat bit confused with the word transmission. It used both for describing the low level interface and its mechanical meaning (indicating the gear ratio). Making this part flexible is important: we could be more precise in the quantities send to the low level control. I have seen EffortInterface used for joint torque, motor torque and motor current. It would also allow us to send more information when needed. For instance Gain scheduling is often used, and I do not see how we can send PID gains on line with the current ros1_control API. |
The messages were released to Foxy, I'm closing this discussion for now. |
Bit of a devil's advocate post, and admittedly I haven't read all the discussion around this, but what is the main rationale for wanting to use a single message (type) / topic to carry the system/joint state?
An alternative could be to use dedicated datastreams for specific types of data. That would seem to remove the need for a flexible grab bag/union type message, as producers would publish an appropriate message for their type of data and consumers would subscribe to it (ie: controllers).
New data types would result in new publications and subscriptions, not require extensions of existing messages. That would avoid the biggest issue identified with the current
JointState
message.Semantics could even be derived from the (names of) topics and how they are connected between producers and consumers, instead of from the specific message types they carry. Not sure that would be desirable necessarily, but it would make things even more flexible.
I'm thinking a Mathworks Simulink type of setup, where blocks exchange primitive types and vectors of those as signals. Creating dedicated message types for those vectors would be something we can add here so type-checking can help us avoid making stupid connections (to avoid the "coffee temperature controls the throttle of my car" type of situations), but not exchanging a union type message which can contain "anything" seems like it would keep controller designs sane and implementations less complex.
(originally posted in #16 (comment))
The text was updated successfully, but these errors were encountered: