Transmission interface URDF parsing (imported from ddengster)#182
Conversation
|
This may implement part of Issue #86. This code uses TinyXML lib to parse the URDF then extract the TransmissionInfo details. Perhaps it should be adapted to use the urdf class which already parses URDF? Though the interface doesnt necessarily change so we could accept this and add an issue to revisit in the future. |
|
hi @guru-florida Please separate the changeset from the joint limits PR though. Doing so really helps your reviewers to keep maintain their sanity and it also increases your chances of getting reviews in a timely manner. |
|
ALL, HAVE YOU CHECKED OUT THIS BRANCH??? READ THIS! @bmagyar Yes, I goofed there with building these changes on top of joint limits branch when i know better! I have rebased this branch to master and removed the joint limits commits. I would like to force push this now....are you ok with that? I assume the github PR will update ok even with a force push? This is a rebase, I didnt manually move code/files. I can confirm my new branch only affects transmission_interface directory: |
|
Please make the force push.
|
ffc25d4 to
2ab6a0f
Compare
|
@bmagyar push complete. 👍 |
|
@bmagyar @Karsten1987 @ddengster Any chance you guys can review and pull this in? I am using this and joint limits in the gazebo_ros2_control module and thanks to @ahcorde we have a working example of ros2_control in gazebo. I can help port this stuff to components as well when ready. |
|
I've got a long backlog but this is on the top of my todo list. |
transmission_interface/include/transmission_interface/transmission_parser.hpp
Outdated
Show resolved
Hide resolved
Karsten1987
left a comment
There was a problem hiding this comment.
I would really like to see that we get rid of rclcpp as a dependency that low in the dependency graph.
transmission_interface/include/transmission_interface/transmission_parser.hpp
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/transmission_parser.hpp
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/transmission_info.hpp
Show resolved
Hide resolved
|
Checked in:
TODO: |
|
I'll submit a PR against your branch @guru-florida , (once again) getting rid of the TransmissionParser class which. This will also get rid of logging, etc. The client of the library can choose what to do with those exceptions. |
|
@guru-florida please see my suggested changes on guru-florida#1 |
|
Any particular reason to get rid of the class? or just thinking it's not really necessary to be a class when it's basically a single method? I was looking around the other parses like URDF and SDF. Looks like URDF needs some work on error handling and logging, but SDF has established returning a "vector of parse error objects" as an out arg. I was thinking we should make it consistent and I am ok with the out arg. The error object is similar to std::runtime_error interface. We could copy/paste SDF ParseError object then later refactor URDF, SDF and this into rcutils or parse module (perhaps header only module). Thoughts? |
|
The class never served a purpose, all the operations are stateless. We have a bunch of other parsers in ros2_control that could use some love but I think we should consider that for the future. Changing things in SDF and URDF, as well as rcutils are not something we'll get available in Foxy (due to releases cycles, etc), which is what we are aiming for now. |
|
I reviewed your PR commits and everything looks good to me. Agreed on focusing on foxy release. Not sure what is going on with the CI checks because building, cpplint, uncrustify and tests seem good locally. CI issue? Logs showing colcon cant find the packages which I cant understand why. So I am go for merge to master if you are...post CI check fixes. |
|
I poked the CI |
|
@guru-florida Please try rebasing to latest master, I'm not sure what to make of the CI's response... |
…verted TransmissionInfo name/type fields to those in current ros2_controls master. Enabled and fixed up unit tests. Added joint, actuator type and mechanicalReduction to transmission test URDF.
… not the joint. Joint name is in the joints[] array elements
87a0033 to
f2ab949
Compare
|
@bmagyar Good catch! That did the trick. |
This PR pulls in joint_limit_interface and transmission_interface updates with #134 changes which remove state and command handles and replace with just JointHandle. It has been synced with the latest ros2_control/master branch.
WARNING: This PR also includes PR181 changes. I created PR181 with just joint_limit_interface in case the lesser scope PR is approved first. I probably should have isolated these two branches but alas I did not. oops.
Also all tests (previously commented out) have been fixed up and pass on my local system.
Suggesting review by @Karsten1987 @bmagyar as well.
This PR:
Originally coded by: @ddengster and @davetcoleman
#134, refactor + unit tests by myself: guru-florida