Add a struct for Interface information, update the test URDF#167
Add a struct for Interface information, update the test URDF#167bmagyar merged 9 commits intoros-controls:masterfrom
Conversation
hardware_interface/include/hardware_interface/components/component_info.hpp
Show resolved
Hide resolved
01fc30d to
0c89bfc
Compare
hardware_interface/include/hardware_interface/components/component_info.hpp
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/components/component_info.hpp
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/components/joint.hpp
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/components/component_info.hpp
Outdated
Show resolved
Hide resolved
hardware_interface/src/components/component_lists_management.hpp
Outdated
Show resolved
Hide resolved
hardware_interface/src/components/component_lists_management.hpp
Outdated
Show resolved
Hide resolved
23c82e0 to
7af10f7
Compare
7af10f7 to
18ed973
Compare
destogl
left a comment
There was a problem hiding this comment.
Looking good. Just a few small corrections.
Thanks for language and grammar corrections 👍
| joint_info_.parameters["max_position"] = "3.14"; | ||
| joint_info_.parameters["min_position"] = "-3.14"; |
There was a problem hiding this comment.
| joint_info_.parameters["max_position"] = "3.14"; | |
| joint_info_.parameters["min_position"] = "-3.14"; | |
| joint_info_.parameters["max"] = "3.14"; | |
| joint_info_.parameters["min"] = "-3.14"; |
There was a problem hiding this comment.
See next comment, below
| EXPECT_EQ(hardware_info.joints[0].state_interfaces[0], "position"); | ||
| EXPECT_EQ(hardware_info.joints[0].state_interfaces[0].name, "position"); | ||
| ASSERT_THAT(hardware_info.joints[0].parameters, SizeIs(2)); | ||
| EXPECT_EQ(hardware_info.joints[0].parameters.at("max_position_value"), "${PI}"); |
There was a problem hiding this comment.
We should also change those into "min" and "max"
There was a problem hiding this comment.
If I understand correctly, the key of joints[0].parameters can be any string. I believe you are thinking of joints[0].command_interfaces[0].min and joints[0].command_interfaces[0].max
For example, this is perfectly valid:
EXPECT_EQ(hardware_info.joints[0].parameters.at("serial_number"), "A12345C63");
There was a problem hiding this comment.
A lot of the example URDF has this:
<joint name="joint1">
<classType>ros2_control_components/PositionJoint</classType>
<param name="min_position_value">-1</param>
<param name="max_position_value">1</param>
</joint>
Maybe these examples are deprecated and they need to be deleted? Hopefully in a follow-up PR?
There was a problem hiding this comment.
Let us see than later, what we do.
Probably this Example URDFs should go into test_robot_hatdware package.
Closes #132