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

Pybindings human state #379

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

carloscp3009
Copy link

@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

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 .


# Output package is:
#
# bipedal_locomotion
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
# bipedal_locomotion
# hde

@@ -25,6 +25,7 @@ target_include_directories(${LIBRARY_TARGET_NAME} PUBLIC

set_property(TARGET ${LIBRARY_TARGET_NAME} PROPERTY PUBLIC_HEADER ${${LIBRARY_TARGET_NAME}_GEN_HDR})

message(STATUS "-----> adding library ${PROJECT_NAME}::${LIBRARY_TARGET_NAME}")
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
message(STATUS "-----> adding library ${PROJECT_NAME}::${LIBRARY_TARGET_NAME}")

Leftovers?

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.

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.

None yet

4 participants