0
$\begingroup$

Rosanswers logo

I have some ROS packages developed for a robot which I want to deploy on a jetson TX2(ARM® Cortex®-A57 MPCore) with ROS melodic (the robot has a TX2 for its computer). I want the packages to be compiled on a PC (running Ubuntu 18 presumably) and deploy them on the TX2 to be run on it.

  1. Basically I want the output of catkin_make install for TX2, in my PC so that I can put the install/ directory into the robot from the build machine
  2. I only need to cross compile my own packages. ROS and other dependencies will be pre installed on the TX2

I am an absolute noob to this cross compilation. The most straightforward guide I have found so far is this article for raspberry pi. This other article cross compiles ROS for PX2 but it is not very clear to me. Many other resources are outdated.

Can someone please show me the path I should follow for this? Where do I begin? Which toolchains do I use? What options do I set (catkinm CMake...)? Any insight related to this is much appreciated


What I have found so far (Are these what I need? I have no idea)

  1. GCC toolchain for 64bit BSP
  2. TX2 is aarch64

Originally posted by teshansj on ROS Answers with karma: 168 on 2020-07-21

Post score: 0


Original comments

Comment by Martin Peris on 2020-07-21:
I know this is not the answer you are looking for, but what I ended up doing is setting up an arm emulator on my x86 host machine and run a docker container with ROS to compile my packages. It is almost as slow as compiling on target but works for what we need. I got the idea from here https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/#setting-up-arm-emulation-on-x86

Comment by gvdhoorn on 2020-07-29:
Does ros-tooling/cross_compile not cover this use-case?

Comment by teshansj on 2020-07-29:
@gvdhoom just came across that a few hours ago and it works pretty well. No hassle. I don't know how I missed that. Thanks anyways

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Until a good answer comes up, check the thread I started in nvidia developer forum if someone is stuck with a similar problem. I'm still halfway from getting everything right but got some stuff to work.

EDIT: No need to do it from the scratch. Use ros-tooling/cross_compile


Originally posted by teshansj with karma: 168 on 2020-07-29

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$