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

Linux architecture issue #169

Open
gtirth opened this issue Aug 31, 2023 · 11 comments
Open

Linux architecture issue #169

gtirth opened this issue Aug 31, 2023 · 11 comments
Labels
good first issue Good for newcomers

Comments

@gtirth
Copy link

gtirth commented Aug 31, 2023

I am trying to run ros2_kortex inside a docker on stereolab's zedbox orin nx. But when I tried to compile the sources i got an error that aarch64 is not supported.
image

Is there a workaround for this?

@moriarty
Copy link
Collaborator

No, at this time Kinova does not provide an arm64 kortex api

@gtirth
Copy link
Author

gtirth commented Aug 31, 2023

No, at this time Kinova does not provide an arm64 kortex api

Would it be possible to use moveit?

@moriarty
Copy link
Collaborator

Duplicate of #158

@Arron-Indrotek
Copy link

Hi @moriarty, We where hoping you could help us get the Kinova gen3 ROS 2 drivers working on NIVIDA Jetson. Are you the best person to collaborate with? Do you have the source secure to compile the stack on the ARM cortex?... or is there someone else we should colab with?

@moriarty
Copy link
Collaborator

Which Jetson? The older Jetson with older arm chip might be possible but not the newer models. I don't have access to the kortex api source code but have asked Kinova for newer arm chip support.

@frfournier
Copy link

frfournier commented Sep 13, 2023

Kinova supports the kortex_api package on ARM (Jetson armv7 compiled with gcc) but it is not currently added as a supported architecture in the ros2_kortex_api package. As mentionned, support for aarch64 is not currently available.
For armv7: The architecture would have to be added to the CMake (https://github.com/Kinovarobotics/ros2_kortex/blob/main/kortex_api/CMakeLists.txt#L23) and link to the armv7 build of kortex API (https://artifactory.kinovaapps.com/ui/repos/tree/General/generic-public/kortex/API/2.6.0/linux_armv7_jetson_gcc.zip). you should then be able to compile following the instructions in the README (https://github.com/Kinovarobotics/ros2_kortex#protobuf)

@moriarty
Copy link
Collaborator

Yes I don't have an armv7 board myself setup to test it out right now, and I thought the latest Jetsons were armv8 but if the kortex_api is available this should be possible.

We had originally discussed arm64 support as part of the ROS 2 drivers project because it's a common with all the new MacBook chips.

As also discussed it would be really great if enough of the underlying kortex api could be open sourced so that as new chips are released support could be added with less effort and easier to support and debug.

I'm currently pretty busy and no longer have a Kinova Gen3 to test on hardware, but I think I have an old Jetson in storage that I could test on...

If the binary api is available then it should be just a bit of CMake to pull that in based on the architecture.

@autonomousTurtle
Copy link

I'm working on a gen3 with nvidia orin dev kit with jetpack 6 (Ubuntu 22). Using the suggestion above the kortex api builds, but the kortex driver does not - even with the same change in the CMake.
image
Happy to help test and debug as I work through this.

@BillyMazotti
Copy link

Hi has there been any update on this? I'm running Ubuntu 22 with ROS2 in a virtual machine on my Macbook with M1 and running into the same issue.

@autonomousTurtle
Copy link

autonomousTurtle commented Mar 12, 2024

I was able to get my system up and running, but will not claim that this is scalable or a best practice, merely a workaround. I first changed to the link and architecture type in cmake as @ffournier-kinova suggested, but the extract feature through fetch content was expecting a tar file, not a zip. Threw up build errors, and I'm not familiar enough with fetch content for my 2 minutes of googling to produce a solve. Therefore, here is my working workaround:

this in on Nvidia Orin Dev Kit running ROS2 Humble

  1. I downloaded the files from the kortex API (https://artifactory.kinovaapps.com/ui/repos/tree/General/generic-public/kortex/API/2.6.0/linux_armv7_jetson_gcc.zip) and extracted into a folder in my ros2 workspace.
  2. I pointed the scripts to that downloaded and extracted folder.

Working cmake code for kortex_api package below:

cmake_minimum_required(VERSION 3.14)
#include(FetchContent)
#include(ExternalProject)
#FetchContent_Declare(
#  kinova_binary_api
#  URL https://artifactory.kinovaapps.com/ui/repos/tree/General/generic-public/kortex/API/2.6.0/linux_armv7_jetson_gcc.zip
#  URL_HASH MD5=988d210bcff2009a96659c115bb4fc62
#)

#FetchContent_MakeAvailable(kinova_binary_api)
#set(FETCHCONTENT_ZIP_USE_SYSTEM ON)

set(KINOVA_BINARY_API_DIR "/home/apricity/workspace/ros2_kortex_ws/linux_aarch64_gcc_7.4")

project(kortex_api)

#Future:
# convert API_URL components from CMAKE_SYSTEM variables.
# The kinova artifactory server artifacts have slightly different expectations and they need some transformations
# Could build something like: (URL_OS)_(URL_PROCESSOR)_(?)_(URL_COMPILER).zip
# string(REPLACE "_" "-" URL_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}) # x86_64 -> x86-64
# string(TOLOWER ${CMAKE_SYSTEM_NAME} URL_OS) # Linux -> linux

#Current: only support Linux x86_64
#if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
#  set(API_URL https://artifactory.kinovaapps.com:443/artifactory/generic-public/kortex/API/2.5.0/linux_x86-64_x86_gcc.zip)
#elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
#  set(API_URL https://artifactory.kinovaapps.com/ui/repos/tree/General/generic-public/kortex/API/2.6.0/linux_armv7_jetson_gcc.zip)
#else()
#  set(API_URL "")
#  message(FATAL_ERROR "Unsupported System: currently support is for Linux x68_64. Detected ${CMAKE_SYSTEM_NAME} and ${CMAKE_SYSTEM_PROCESSOR}")
#endif()

#ExternalProject_Add(kinova_binary_api
#  URL ${API_URL}
#  CONFIGURE_COMMAND ""
#  BUILD_COMMAND ""
#  INSTALL_COMMAND ""
#)

find_package(ament_cmake REQUIRED)

ament_export_include_directories(include/kortex_api)

install(DIRECTORY ${KINOVA_BINARY_API_DIR}/include/client/ DESTINATION include/kortex_api)
install(DIRECTORY ${KINOVA_BINARY_API_DIR}/include/common/ DESTINATION include/kortex_api)
install(DIRECTORY ${KINOVA_BINARY_API_DIR}/include/messages/ DESTINATION include/kortex_api)
install(DIRECTORY ${KINOVA_BINARY_API_DIR}/include/client_stubs/ DESTINATION include/kortex_api)
install(DIRECTORY ${KINOVA_BINARY_API_DIR}/include/google/protobuf DESTINATION include/kortex_api/google)

ament_package()

You will also need to update the kortex driver cmake in the same way. So far no issues, I will report back if something else is broken with this process in use that I haven't discovered yet.

I also had to delete all references to issac sim for the package to work, but I believe that error was unrelated.

@Shiven110504
Copy link

Hi, how would you change the kortex driver cmake. Could you point in what we will need to change.

@aalmrad aalmrad added the good first issue Good for newcomers label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

8 participants