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

Add Python bindings for human state-related data structures #379

Merged
merged 5 commits into from
Aug 2, 2024

Conversation

carloscp3009
Copy link
Contributor

@carloscp3009 carloscp3009 commented Feb 12, 2024

This PR allows to send humanState msgs using python (in case you want to send these positions to a walking controller you should connect the ports just as shown in the commented line)

import yarp
import hde.bindings as hde

network = yarp.Network()

human_port = hde.msg.BufferedPortHumanState()
human_port.open("/portName")
# network.connect("/portName", "/walking-coordinator/humanState:i")

while True:
    human_state = human_port.prepare()
    human_state.positions = data_positions
    human_state.jointNames = data_column_names
    human_port.write()

data_positions, data_column_names are the variables that contain your data

@traversaro
Copy link
Member

traversaro commented Feb 12, 2024

@evalli-iit @claudia-lat @GiulioRomualdi @robotology/iit-ami-scrum-masters we still have Lorenzo Rapetti listed as mantainers here, do you have any idea on who can be mantainer here in place of him? If no one is available I can act as a fallback, but if we can avoid that it would be great.

@DanielePucci
Copy link
Contributor

A possibility could be @davidegorbani

CMakeCache.txt Outdated
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.22

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the CMakeCache.txt, it is a file that is supposed to be inside the build directory and contains user-specific folders.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that you have this in the root folder indicates that probably you did a in-source build, while we typically always try to do out of source builds, see https://cmake.org/cmake/help/book/mastering-cmake/chapter/Getting%20Started.html#directory-structure :

Out-of-source builds, where the source and binary directories are different, are strongly encouraged. In-source builds where the source and binary directories are the same are supported but should be avoided if possible. Out-of-source builds make it very easy to maintain a clean source tree and allow quick removal of all of the files generated by a build. Having the build tree differ from the source tree also makes it easy to support having multiple builds of a single source tree. This is useful when you want to have multiple builds with different options but just one copy of the source code.

@@ -0,0 +1 @@
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
# This file is generated by cmake for dependency checking of the CMakeCache.txt file

As CMakeCache.txt .

Copy link
Member

@traversaro traversaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments.

@traversaro
Copy link
Member

@carloscp3009 when you have time (I guess post-deadline) feel free to ping me so we can go through this changes together).

@S-Dafarra
Copy link
Contributor

Hi @carloscp3009! In view of the imminent distro release, it would be useful to have this.

@S-Dafarra
Copy link
Contributor

Hi @carloscp3009! In view of the imminent distro release, it would be useful to have this.

Friendly ping

@carloscp3009
Copy link
Contributor Author

Hi @carloscp3009! In view of the imminent distro release, it would be useful to have this.

I was focused on the paper and then on break, I will resume this activity this week.

carloscp3009 and others added 2 commits July 24, 2024 14:18
Deleting debugging statements

Co-authored-by: Silvio Traversaro <silvio@traversaro.it>
@giotherobot
Copy link
Member

@traversaro are there more modification to be made here?

Copy link
Member

@traversaro traversaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for me, but please ping on a PR when you do the modifications to address a review, otherwise the reviewer does not know when the PR is ready for review again.

@S-Dafarra
Copy link
Contributor

Who is going to press the green merge button? 😁

@traversaro traversaro changed the title Pybindings human state Add Python bindings for human state-related data structures Aug 2, 2024
@traversaro
Copy link
Member

Looking a bit in the history, it seems that possible mantainers (i.e. people that press the button) can be either:

I can do that myself, but probably it would be good if someone in a team actively using this repo would be the mantainer.

@dariosortino
Copy link
Collaborator

I would avoid me either because my understanding of this repo as a whole is really not enough to press the green button being sure that everything won't explode

@S-Dafarra
Copy link
Contributor

From the comment above @davidegorbani is also one option and more likely to actively working on the code herein contained (and not just the configuration files like me 😊 ). Nonetheless, I can merge this one. I am going to squash and merge given the presence of the cache files in history.

@S-Dafarra S-Dafarra merged commit d78593a into robotology:master Aug 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants