Skip to content

Min max to attribute#25

Merged
bmagyar merged 7 commits intoros-controls:masterfrom
bmagyar:min_max_to_attribute
Sep 21, 2020
Merged

Min max to attribute#25
bmagyar merged 7 commits intoros-controls:masterfrom
bmagyar:min_max_to_attribute

Conversation

@bmagyar
Copy link
Copy Markdown
Member

@bmagyar bmagyar commented Sep 9, 2020

Please note that I'm also proposing to remove limits when only state interfaces are declared. We can extend the design later but I don't think state interfaces need limiting at this stage.

Resolves #23

@bmagyar bmagyar requested a review from destogl September 9, 2020 10:21
Copy link
Copy Markdown
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looks good. I think this go into very nice direction. I also found another error I did in initial description.

@@ -119,27 +120,31 @@ Note:
</hardware>
<joint name="joint1">
<classType>ros2_control_components/MultiInterfaceJoint_MultiWrite</classType>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CamelCase

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

<stateInterfaceType>position</stateInterfaceType>
<param name="min_position_value">${-PI}</param>
<param name="max_position_value">${PI}</param>
<stateInterfaceType name="position">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be this optional limits for the stateInterfaceType.

Nevertheless, I did error here, I think here we should have sensor and not joint component (tag in L306))

<param name="max_value">1</param>
</joint>
</ros2_control>
<ros2_control name="2DOF_System_Robot_ForceTorqueSensor" type="sensor">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CamelCase

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's all CamelCase now

@@ -367,16 +377,10 @@ Note:
<classType>ros2_control_components/IMUSensor</classType>
<stateInterfaceType>velocity</stateInterfaceType>
<stateInterfaceType>acceleration</stateInterfaceType>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep the values here as an option.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roger that

</sensor>
<sensor name="sensor2">
<classType>ros2_control_components/2DImageSensor</classType>
<stateInterfaceType>image</stateInterfaceType>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same as above

@@ -119,27 +120,31 @@ Note:
</hardware>
<joint name="joint1">
<classType>ros2_control_components/MultiInterfaceJoint_MultiWrite</classType>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename this to:

"MultiInterfaceMultiWriteJoint"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@bmagyar bmagyar requested a review from destogl September 12, 2020 09:37
Copy link
Copy Markdown
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we are already renaming stuff than we could introduce RRBot immediately :)

<param name="min_value">-0.5</param>
<param name="max_value">0.5</param>
</commandInterfaceType>
<commandInterfaceType name="position" min="-1" max="1"/>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You added here the parameters as attributes and above as child elements. Did you do this on purpose?

Does this mean that MultiInterfaceJoint have min and max values as mandatory attributes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd always consider min-max to be optional

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is not confusing for the users. Because in some cases is attribute and in some case is child element. I understand why and when, but a new user could have issues with it.

<ros2_control name="2DOFSystemRobotPositionOnly" type="system">
<hardware>
<classType>ros2_control_demo_hardware/2DOF_System_Hardware_Position_Only</classType>
<classType>ros2_control_demo_hardware/2DOFSystemHardwarePositionOnly</classType>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: rename this to RRBotSystemPositionOnlyHardware

This is inline with ros-controls/ros2_control_demos#37 so it could increase understanding of the examples and demos

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


```xml
<ros2_control name="2DOF_System_Robot_Position_Only" type="system">
<ros2_control name="2DOFSystemRobotPositionOnly" type="system">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: rename this to RRBotSystemPositionOnly

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


```xml
<ros2_control name="2DOF_System_Robot_MultiInterface" type="system">
<ros2_control name="2DOFSystemRobotMultiInterface" type="system">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: rename this to RRBotSystemMultiInterface

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

<ros2_control name="2DOFSystemRobotMultiInterface" type="system">
<hardware>
<classType>ros2_control_demo_hardware/2DOF_System_Hardware_MultiInterface</classType>
<classType>ros2_control_demo_hardware/2DOFSystemHardwareMultiInterface</classType>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: rename this to RRBotSystemMultiInterfaceHardware

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

</transmission>
</ros2_control>
<ros2_control name="2DOF_Modular_Robot_joint2" type="actuator">
<ros2_control name="2DOFModularRobotJoint2" type="actuator">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: rename this to RRBotModularJoint2

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

</joint>
</ros2_control>
<ros2_control name="2DOF_System_Robot_Position_Sensor_joint1" type="sensor">
<ros2_control name="2DOFSystemRobotPositionSensorJoint1" type="sensor">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: rename this to RRBotModularPositionSensorJoint1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

</joint>
</ros2_control>
<ros2_control name="2DOF_System_Robot_Position_Sensor_joint2" type="sensor">
<ros2_control name="2DOFSystemRobotPositionSensorJoint2" type="sensor">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: rename this to RRBotModularPositionSensorJoint2

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah


```xml
<ros2_control name="2DOF_Modular_Robot_Wrist" type="system">
<ros2_control name="2DOFModularRobotWrist" type="system">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: rename this to RRBotModularWrist

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


```xml
<ros2_control name="2DOF_Modular_Robot_joint1" type="actuator">
<ros2_control name="2DOFModularRobotJoint1" type="actuator">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: rename this to ActuatorModularJoint1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah

@bmagyar bmagyar requested a review from destogl September 15, 2020 16:25
<param name="min_value">-0.5</param>
<param name="max_value">0.5</param>
</commandInterfaceType>
<commandInterfaceType name="position" min="-1" max="1"/>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is not confusing for the users. Because in some cases is attribute and in some case is child element. I understand why and when, but a new user could have issues with it.

@bmagyar bmagyar force-pushed the min_max_to_attribute branch from 4e550f4 to c0f1497 Compare September 21, 2020 14:53
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

Successfully merging this pull request may close these issues.

commandInterfaceType should have min-max values as attributes

3 participants