Giter VIP home page Giter VIP logo

yarp-devices-ros2's Introduction

YARP logo Yarp devices for ROS2

This repository contains the YARP devices and utilities for ROS2.

๐Ÿšง This repository is currently work in progress. ๐Ÿšง ๐Ÿšง The software contained is this repository is currently under testing. ๐Ÿšง APIs may change without any warning. ๐Ÿšง This code should be not used before its first official release ๐Ÿšง

Documentation

Documentation of the individual devices is provided in the official Yarp documentation page: YARP documentation

Installation

Build with pure CMake commands

# Configure, compile and install
cmake -S. -Bbuild -DCMAKE_INSTALL_PREFIX=<install_prefix>
cmake --build build
cmake --build build --target install

# Make ROS msgs available in [ament index](https://github.com/ament/ament_index)
export AMENT_PREFIX_PATH=$AMENT_PREFIX_PATH:<install_prefix>

Build with ROS msgs compiled in separate colcon workspace

# Compile the colcon workspace containing the required messages and services
(cd ros2_interfaces_ws && colcon build)

# Make the workspace available
. ros2_interfaces_ws/install/setup.bash

# Configure and compile
cmake -S. -Bbuild -DYARP_ROS2_USE_SYSTEM_map2d_nws_ros2_msgs:BOOL=ON -DYARP_ROS2_USE_SYSTEM_yarp_control_msgs:BOOL=ON -DCMAKE_INSTALL_PREFIX=<install_prefix>
cmake --build build
cmake --build build --target install

CI Status

๐Ÿšง This repository is currently work in progress. ๐Ÿšง

Build Status

License

๐Ÿšง This repository is currently work in progress. ๐Ÿšง

Maintainers

This repository is maintained by:

@randaz81
@elandini84

yarp-devices-ros2's People

Contributors

drdanz avatar elandini84 avatar martinaxgloria avatar nicogene avatar randaz81 avatar ste93 avatar traversaro avatar xenvre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yarp-devices-ros2's Issues

Cannot build the devices with ROS 2 Iron

I am using ros2 iron on Ubuntu 22.04 and I am having difficulties to build the devices.

I am following the pure CMake-based installation instructions in https://github.com/robotology/yarp-devices-ros2#build-with-pure-cmake-commands.

The built stops with the following errors:

 62%] Linking CXX shared library ../../../lib/libyarp_control_msgs__rosidl_typesupport_introspection_cpp.so
[ 62%] Built target yarp_control_msgs__rosidl_typesupport_introspection_cpp
[ 62%] Built target yarp_control_msgs
[ 62%] Built target ament_cmake_python_copy_yarp_control_msgs
/usr/bin/python3.10: can't open file '/home/user/yarp-devices-ros2/build/ros2_interfaces_ws/src/yarp_control_msgs/ament_cmake_python/yarp_control_msgs/setup.py': [Errno 2] No such file or directory
gmake[2]: *** [ros2_interfaces_ws/src/yarp_control_msgs/CMakeFiles/ament_cmake_python_build_yarp_control_msgs_egg.dir/build.make:70: ros2_interfaces_ws/src/yarp_control_msgs/CMakeFiles/ament_cmake_python_build_yarp_control_msgs_egg] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:1482: ros2_interfaces_ws/src/yarp_control_msgs/CMakeFiles/ament_cmake_python_build_yarp_control_msgs_egg.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Is ros2 iron supported or should I use a different version of ros2? Or are the above errors due to something else?

Thank you

cc @elandini84 @randaz81

Valgrind Test Failures March 2024

I started investigating the valgrind test failures in CI, see for example in https://github.com/robotology/yarp-devices-ros2/actions/runs/8384433539/job/22993087127 .

Looking at the log, it seems that most of the failures are actually due to ROS2 itself, see ros2/rcl#1009 and ros2/rcutils#407 .

At this point, I guess the possible solutions are:

  • either disable the valgrind test
  • or add the ros2 failures to a valgrind suppression file, and use this suppression in all the valgrind tests

ros2 interface list not showing yarp msgs

Hi, I've experienced some problems after installing the yarp-devices-ros2 repository.
When trying to use the yarp_control_msgs I've seen that ros2 wasn't able to find them.
At the end I had to copy the files into the ros humble folder, as it follows:
sudo cp -r yarp_control_msgs/* /opt/ros/humble/
After this I used the 'ros2 interface list' and was able to find them and use them.

Include map2d_nws_ros2_msgs in the main CMake build via add_subdirectory?

Hi @elandini84, @randaz81, @drdanz,
I was looking at the repo installation instructions (in view of possible integration in the future with https://github.com/robotology/robotology-superbuild). I noticed that at the moment the installation instruction have two steps:

  • First, use colcon to build, configure and install the map2d_nws_ros2_msgs CMake/Ament package
  • Then, use cmake to build the yarp-ros2 package, that finds via find_package the map2d_nws_ros2_msgs CMake package.

Do you think it would be possible instead to just include via add_subdirectory the map2d_nws_ros2_msgs directory and then link to the map2d_nws_ros2_msgs CMake target? This would permit to configure the repo with a single cmake invocation, as it is typical done with CMake projects.

cc @ahoarau

How to handle the coupled joints with robot_state_publisher

Today I tried to run robot_state_publisher with iCubGazeboV2_5_visuomanip urdf model but opening rviz2 I got these errors:

immagine

immagine

(same thing for the right part)

I suspected that there were issues in the kinematic chains, but this might not be the case since @xEnVrE and @pattacini used this model for grasping for a while (https://robotology.github.io/icub-gazebo-grasping-sandbox/).
Then chatting with @xEnVrE we realized that the problem is that the topic /joints_state publish the position, velocity, and effort of, for example, eye_version but robot_state_publisher does not know the coupling law for computing the tf of l_eye and r_eye given that joint value over time. Same thing for the fingers.

I am not aware of how is usually handled the under actuation in ros/ros2, maybe the coupling laws should be provided by the device and then used by the nws in order to publish also the joint values of the decoupled joints.

Somehow related to robotology/gazebo-yarp-plugins#470

Here are some images from rqt

immagine

immagine

cc @pattacini @traversaro @xEnVrE @randaz81 @elandini84

Cartesian z coordinate not correctly assigned in frameTransformSet_nwc_ros2

While using the frameTransformSet_nwc_ros2 device from within a C++ executable I noticed that the transforms I was setting were not correctly published in tf. Specifically, the z coordinate was different from the one published by the user and always equal to the y coordinate.

After checking the code I discovered that the assignment is not correct, as per:

tempTransl.x = input.translation.tX;
tempTransl.y = input.translation.tY;
tempTransl.z = input.translation.tY;

macOS CI failure

2021-11-18T02:23:20.7246370Z [150/997] Building CXX object src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o
2021-11-18T02:23:20.7348730Z FAILED: src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o 
2021-11-18T02:23:20.7459240Z /usr/local/miniconda/envs/test/bin/x86_64-apple-darwin13.4.0-clang++ -DBUILDING_YARP -DYARP_HAS_ACE -DYARP_HAS_Libedit -DYARP_os_EXPORTS -D__ACE_INLINE__ -I/Users/runner/work/yarp-ros2/yarp-ros2/yarp/src/libYARP_os/src -I/Users/runner/work/yarp-ros2/yarp-ros2/yarp/src/libYARP_conf/src -I/Users/runner/work/yarp-ros2/yarp-ros2/yarp/build/src/libYARP_conf/src -isystem /Users/runner/work/yarp-ros2/yarp-ros2/yarp/extern/hmac/hmac -Wall -Wextra -Wsign-compare -Wpointer-arith -Winit-self -Wnon-virtual-dtor -Wcast-align -Wunused -Wvla -Wmissing-include-dirs -Wreorder -Wsizeof-pointer-memaccess -Woverloaded-virtual -Wtautological-undefined-compare -Wmismatched-new-delete -Wparentheses-equality -Wundef -Wredundant-decls -Wunknown-pragmas -Wunused-result -Wc++2a-compat -Wheader-guard -Wignored-attributes -Wnewline-eof -Wdangling-else -Wgcc-compat -Wmicrosoft-exists -Wstatic-inline-explicit-instantiation -Wmisleading-indentation -Wtautological-compare -Winconsistent-missing-override -Wsuggest-override -Wnull-conversion  -Wno-unused-parameter  -Wdeprecated-declarations -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /usr/local/miniconda/envs/test/include -O3 -DNDEBUG -isysroot /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++17 -MD -MT src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o -MF src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o.d -o src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/macos/MacOSAPI.mm.o -c /Users/runner/work/yarp-ros2/yarp-ros2/yarp/src/libYARP_os/src/yarp/os/impl/macos/MacOSAPI.mm
2021-11-18T02:23:20.7551650Z In file included from /Users/runner/work/yarp-ros2/yarp-ros2/yarp/src/libYARP_os/src/yarp/os/impl/macos/MacOSAPI.mm:8:
2021-11-18T02:23:20.7654020Z In file included from /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
2021-11-18T02:23:20.7754430Z /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString
2021-11-18T02:23:20.7858190Z - (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
2021-11-18T02:23:20.7957380Z                                                          ~~~~~~~~~~~~~~                                                                       ^                  ~
2021-11-18T02:23:20.8060510Z /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
2021-11-18T02:23:20.8161680Z         #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
2021-11-18T02:23:20.8262710Z                                                       ^          ~
2021-11-18T02:23:20.8364460Z In file included from /Users/runner/work/yarp-ros2/yarp-ros2/yarp/src/libYARP_os/src/yarp/os/impl/macos/MacOSAPI.mm:8:
2021-11-18T02:23:20.8464830Z In file included from /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:130:
2021-11-18T02:23:20.8565850Z /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLSession.h:500:168: error: expected ')'
2021-11-18T02:23:20.8669190Z - (void)readDataOfMinLength:(NSUInteger)minBytes maxLength:(NSUInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSData * _Nullable_result data, BOOL atEOF, NSError * _Nullable error))completionHandler;
2021-11-18T02:23:20.8770640Z                                                                                                                                                                        ^
2021-11-18T02:23:20.8873180Z /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLSession.h:500:141: note: to match this '('
2021-11-18T02:23:20.8973840Z - (void)readDataOfMinLength:(NSUInteger)minBytes maxLength:(NSUInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSData * _Nullable_result data, BOOL atEOF, NSError * _Nullable error))completionHandler;
2021-11-18T02:23:20.9072620Z                                                                                                                                             ^
2021-11-18T02:23:20.9173630Z 2 errors generated.
2021-11-18T02:23:20.9274850Z [151/997] Building CXX object src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/UdpCarrier.cpp.o
2021-11-18T02:23:22.0020110Z [152/997] Building CXX object src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/impl/PortCore.cpp.o
2021-11-18T02:23:24.8331680Z [153/997] Building CXX object src/libYARP_sig/src/CMakeFiles/YARP_sig.dir/yarp/sig/Image.cpp.o
2021-11-18T02:23:28.0589750Z [154/997] Building CXX object src/libYARP_sig/src/CMakeFiles/YARP_sig.dir/yarp/sig/Image.copyPixels.cpp.o
2021-11-18T02:23:28.0646100Z ninja: build stopped: subcommand failed.
2021-11-18T02:23:28.0751700Z ##[error]Process completed with exit code 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.