robotology / idyntree-yarp-tools

Tools based on the iDynTree library that depend on YARP.
GNU Lesser General Public License v2.1
6 stars 2 forks source link

Understand how to visualize the robot connecting to the stateExt port #6

Closed S-Dafarra closed 3 years ago

S-Dafarra commented 3 years ago

See https://github.com/robotology/idyntree-yarp-tools/pull/5

@S-Dafarra:

Note that I avoided using the ReadOnlyRemoteControlBoard as I figured out that an RPC command reconnectToRobot was enough to reconnect the visualizer in case the communication with the robot gets interrupted. This allows us to not know how the joints are divided in the control boards, hence it should be more scalable. I don't know if we want to remove that plugin later on.

@traversaro:

Just to clarify, the use of ReadOnlyRemoteControlBoard was useful to permit to visualize also the state as published when played back by the yarpdataplayer. In any case, this is not a big issue, and if anyone/any group wants to have that feature he/she can work on it, no need to prevent this from being merged.

@S-Dafarra:

Ah, you are right. The main problem is that I wanted to avoid setting the joint names manually every time. Hence, the trick was to consider all the joints in the URDF. The problem then is to understand how these joints are distributed in the control boards. With the RemoteControlBoardRemapper, this came easy since it is not necessary to divide the joints per control board. With the ReadOnlyRemoteControlBoard, this is not possible since it requires to set the axes names for each control board. As far as I understood, this information is considered absolute truth, and the input vector values are mapped to the joints according to the input order. Hence, not only I needed to get all the sets right, but also their order. This is ok once you know the robot, but I did not want to limit the usage of this tool to a specific set of robots. Do you envision any other way to circumvent this issue? How would be possible to use the RemoteControlBoardRemapper in conjunction with the ReadOnlyRemoteControlBoard?

@traversaro

These are good points, I think you can open a separate issue for this.

And here we are.

S-Dafarra commented 3 years ago

In https://github.com/robotology/idyntree-yarp-tools/pull/5#issuecomment-816649215

I proposed the following:

After some more thinking, I believe we can simply add a command --connectToStateExt (cb1, (j1, j2), cb2, (j3, j4)) specifying the detailed list of joint for each control board. If you think it makes sense, I can deal with that in another PR.

traversaro commented 3 years ago

In #5 (comment)

I proposed the following:

After some more thinking, I believe we can simply add a command --connectToStateExt (cb1, (j1, j2), cb2, (j3, j4)) specifying the detailed list of joint for each control board. If you think it makes sense, I can deal with that in another PR.

To me it make sense, but perhaps @prashanthr05 has some feedback.

prashanthr05 commented 3 years ago

In #5 (comment) I proposed the following:

After some more thinking, I believe we can simply add a command --connectToStateExt (cb1, (j1, j2), cb2, (j3, j4)) specifying the detailed list of joint for each control board. If you think it makes sense, I can deal with that in another PR.

To me it make sense, but perhaps @prashanthr05 has some feedback.

I had a f2f with @S-Dafarra, and we agreed that it seems like a good solution.