Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate simulated MAIS interfaces to use MultipleAnalogSensors interfaces #234

Closed
traversaro opened this issue Mar 6, 2024 · 18 comments · Fixed by #240
Closed

Migrate simulated MAIS interfaces to use MultipleAnalogSensors interfaces #234

traversaro opened this issue Mar 6, 2024 · 18 comments · Fixed by #240

Comments

@traversaro
Copy link
Member

No description provided.

@traversaro
Copy link
Member Author

As discussed in #198 (comment) .

@traversaro
Copy link
Member Author

@martinaxgloria if you are working on iCubGenova11, can you report here:

  • The ports on which iCubGenova11 is publishing mais data
  • An exert of data published there (just saving a few lines of yarp read ... /name/of/the/port and reporting them here is enough, thanks)

@traversaro
Copy link
Member Author

@martinaxgloria can you also report here the patch you have been working with? Thanks!

@martinaxgloria
Copy link
Contributor

martinaxgloria commented Sep 18, 2024

@martinaxgloria can you also report here the patch you have been working with? Thanks!

I'm using the iCubGazeboV2_5_visuomanip model. The patch regards these two files:

In particular, I changed name and device under the [WRAPPER] group into:

  • name: /icubSim/*_hand/MAIS
  • device: multipleanalogsensorsserver

Here the two files:

[WRAPPER]
name /icubSim/right_hand/MAIS
period 10
networks (right_mais)
device multipleanalogsensorsserver

[right_mais]
jointNames r_hand_thumb_1_joint r_hand_thumb_2_joint r_hand_thumb_3_joint r_hand_index_1_joint r_hand_index_2_joint r_hand_index_3_joint r_hand_middle_1_joint r_hand_middle_2_joint r_hand_middle_3_joint r_hand_ring_1_joint r_hand_ring_2_joint r_hand_ring_3_joint r_hand_little_1_joint r_hand_little_2_joint r_hand_little_3_joint
[WRAPPER]
name /icubSim/left_hand/MAIS
period 10
networks (left_mais)
device multipleanalogsensorsserver

[left_mais]
jointNames l_hand_thumb_1_joint l_hand_thumb_2_joint l_hand_thumb_3_joint l_hand_index_1_joint l_hand_index_2_joint l_hand_index_3_joint l_hand_middle_1_joint l_hand_middle_2_joint l_hand_middle_3_joint l_hand_ring_1_joint l_hand_ring_2_joint l_hand_ring_3_joint l_hand_little_1_joint l_hand_little_2_joint l_hand_little_3_joint

@martinaxgloria
Copy link
Contributor

  • The ports on which iCubGenova11 is publishing mais data

/icub/left_hand/MAIS/measures:o and /icub/right_hand/MAIS/measures:o

  • An exert of data published there (just saving a few lines of yarp read ... /name/of/the/port and reporting them here is enough, thanks)

Here you are the output of /icub/left_hand/MAIS/measures:o:

() () () () () () () (((255.0 208.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.50703644753)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.52228999138)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.53259110451)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.54275965691)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.55237603188)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.56285738945)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.57274222374)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.58268594742)) () ()
() () () () () () () (((255.0 208.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.5931429863)) () ()
() () () () () () () (((255.0 208.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.60300111771)) () ()
() () () () () () () (((255.0 208.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.61310815811)) () ()
() () () () () () () (((255.0 208.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.62342000008)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.63314914703)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.64324045181)) () ()
() () () () () () () (((255.0 208.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.65355396271)) () ()
() () () () () () () (((255.0 208.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.66331982613)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.67343473434)) () ()
() () () () () () () (((255.0 208.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.68372559547)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.69350171089)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.70351862907)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.71407437325)) () ()
() () () () () () () (((255.0 208.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.72373723984)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.73379349709)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.74390625954)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.75407671928)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.7641723156)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.7742331028)) () ()
() () () () () () () (((255.0 207.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.78418135643)) () ()
() () () () () () () (((255.0 208.0 216.0 255.0 236.0 255.0 255.0 237.0 255.0 255.0 255.0 255.0 255.0 252.0 255.0) 1726646777.79436635971)) () ()

@traversaro
Copy link
Member Author

Here you are the output of /icub/left_hand/MAIS/measures:o:

Ah sorry, this does not give us the metadata that I am interested in. Can you call the rpc port that starts with /icub/left_hand/MAIS and call getMetadata on it? Thanks!

@martinaxgloria
Copy link
Contributor

Yes, sure. Here you are:

icub@iiticublap235:~$ yarp rpc /icub/left_hand/MAIS/rpc:o 
>>getMetadata 
Response: () () () () () () () ((id_x_hand_mais "" "")) () ()

@traversaro
Copy link
Member Author

Thanks! The revealed another bug (the names between left and right sensors is the same, creating problems if one wanted to insert the two sensors in the same remapper), but that is another story.

@traversaro
Copy link
Member Author

the names between left and right sensors is the same, creating problems if one wanted to insert the two sensors in the same remapper

Reported in robotology/robots-configuration#679 .

@traversaro
Copy link
Member Author

traversaro commented Sep 18, 2024

The fixes are provided in:

@martinaxgloria could you test these PRs and check:

  • If it solves your problem
  • If data is streamed correctly on the /icubSim/left_hand/MAIS/measures:o port?

Thanks!

@martinaxgloria
Copy link
Contributor

Hi @traversaro, thanks for the fixes!

I noticed that you named the MAIS port /icub/*_hand/MAIS and not /icubSim/*_hand/MAIS. Is it wanted?

traversaro added a commit that referenced this issue Sep 18, 2024
@traversaro
Copy link
Member Author

Hi @traversaro, thanks for the fixes!

I noticed that you named the MAIS port /icub/*_hand/MAIS and not /icubSim/*_hand/MAIS. Is it wanted?

No, it was a copy&paste error as I copied the file from the real world config files, fixed in a33dd64 .

@martinaxgloria
Copy link
Contributor

Now everything works properly, thank you!

Here the output of yarp read ... /icubSim/left_hand/MAIS/measures:o

mgloria@iiticb002lw003:~$ yarp read ... /icubSim/left_hand/MAIS/measures:o 
[INFO] |yarp.os.Port|/tmp/port/1| Port /tmp/port/1 active at tcp://10.0.2.73:10029/
[INFO] |yarp.os.impl.PortCoreInputUnit|/tmp/port/1| Receiving input from /icubSim/left_hand/MAIS/measures:o to /tmp/port/1 using tcp
() () () () () () () (((226.586270617047091491 240.806527604257126995 240.833359214207007426 226.581220191471402359 240.806274167312665213 240.83337727293496755 226.606676708060604142 240.813495979132653702 240.833385188201674509 245.503736883302707383 245.540381824538968658 245.555600494670756007 245.511500941734794878 245.542451678064082898 245.555598059000317335) 67.9549999999999982947)) () ()
() () () () () () () (((226.586916624035836776 240.806495663951153574 240.833391409820137596 226.581100451259260353 240.806291014289740815 240.833407692697477387 226.606514552808619101 240.813514386972855164 240.833399503177417955 245.503622039423134993 245.540395220722444947 245.555600815474861065 245.511387757124225573 245.542465507353284693 245.555596824004084056) 67.9650000000000034106)) () ()
() () () () () () () (((226.586480853462688856 240.806452985807737832 240.833351726132491422 226.581119565642211455 240.806344839434643745 240.833436224439850548 226.606750122021225025 240.813537488907201123 240.83343034157522311 245.504014705775233551 245.540389780659296548 245.555620846242248945 245.511793196675711215 245.542449959443729313 245.555612669975943163) 67.9749999999999943157)) () ()
mgloria@iiticb002lw003:~$ yarp rpc /icubSim/left_hand/MAIS/rpc:o 
>>getMetadata 
Response: () () () () () () () ((l_hand_mais "" "")) () ()

@traversaro
Copy link
Member Author

Great, thanks! I will merge and release all repos then.

@pattacini
Copy link
Member

Thanks heaps @traversaro!

@traversaro
Copy link
Member Author

@martinaxgloria the fixed version are now available in master branch of both gazebo-yarp-plugins and icub-models, and released in v4.12.0 and v2.8.0 (respectively). Updated conda binary packages will be available in around an hour (the time for the automatic process to start and end.

@martinaxgloria
Copy link
Contributor

Thanks a lot @traversaro!

@traversaro
Copy link
Member Author

(I just aligned devel of gazebo-yarp-plugins and icub-models with master branches).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants