How do I use the velocity controllers with joint command interfaces in the gz simulator? #58
-
More specifically, I noticed in auv_control_demos the chained_controller example has multiple joints named the "Cartesian Joints" that seem to be where the state interface and command interfaces are set up in the <ros2_control> tag in the example's corresponding ros2_control.xacro file. I attempted to create my own .xacro model with this kind of setup, but more complete (such that it includes the collisions, inertials, visuals, as well as the thrusters). Adding the cartesian_joints as the demos have suggested. However, it seems that the gz simulator does not support multiple joints connecting the same links to one another. here's the specific error and warning that the simulator spits out when i attempt to do the cartesian joints:
I'm not sure how I'll be able to pass these commands without defining a joint, since command interfaces in ros2_control seem to always require a joint to be parented to. But if there's another way of passing the commands please let me know! Oh, I almost forgot, how I structured the controllers is: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
is it possible to just send a command interface of all the efforts on each cartesian axes through just one single joint instead? so instead of doing
it would be
or is there an underlying reason behind why it was structured that way? |
Beta Was this translation helpful? Give feedback.
-
I'll caveat this message by saying that it has been a while since I made that design decision, so there may be something that has changed since I implemented that or something that I missed... from what I remember, ros2_control only loads one command interface per joint, so you need to define multiple joints. To help you get started, I would recommend going through the UVMS control demo that I recently wrote here. The demo has been tested and works. It uses the architecture that you described above with a complete setup that you can reference (you can ignore the whole body control) |
Beta Was this translation helpful? Give feedback.
-
Regardless, with the control architecture that you described in your first message, you shouldn't need to define those joints in your URDF. The TAMC defines those command interfaces for you in "chained mode". The only extra joints that you should need to add are the thruster joints. The examples folder that I linked in the previous post should provide some complete examples demonstrating how to setup your system. |
Beta Was this translation helpful? Give feedback.
Regardless, with the control architecture that you described in your first message, you shouldn't need to define those joints in your URDF. The TAMC defines those command interfaces for you in "chained mode". The only extra joints that you should need to add are the thruster joints. The examples folder that I linked in the previous post should provide some complete examples demonstrating how to setup your system.