Issues running cross-compiled ROS in custom folder

Hi

I cross-compiled ROS using the following link:

I was able to get an install_isolated.tar.gz file which I transfer to the Pegasus (Xavier) platform only runs if it is located under /home/nvidia folder.

I tried to move it to a more generic location such /opt/ros/melodic but I am getting errors when trying to run it from that location:

nvidia@tegra-ubuntu:/opt/ros/melodic$ roscore
… logging to /home/nvidia/.ros/log/314dc206-1d18-11eb-8c31-00044bf65e6d/roslaunch-tegra-ubuntu-23045.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://tegra-ubuntu:38963/
ros_comm version 1.14.9
SUMMARY

PARAMETERS

/rosdistro: melodic
/rosversion: 1.14.9

NODES

RLException: roscore cannot run as another roscore/master is already running.
Please kill other roscore/master processes before relaunching.
The ROS_MASTER_URI is http://tegra-ubuntu:11311/
The traceback for the exception was written to the log file

I would like to know if there is away to do not include the PATH when doing cross-compilation. checking files inside etc/, lib/ and sh scripts points to the /home/user/ros_catkin_ws which does not exists on the Pegasus platform.

Thanks

Hi @jpvans,

Is this the error you’re talking about? If not, what’s the issue?

@VickNV

Sorry. I didn’t paste the problematic output:

root@tegra-ubuntu:/opt/ros/melodic# roscore
WARNING: cannot load logging configuration file, logging is disabled
… logging to /root/.ros/log/54ddf57c-1d2e-11eb-b83e-00044bf65e6d/roslaunch-tegra-ubuntu-3840.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Resource not found: roslaunch
ROS path [0]=/usr/share
The traceback for the exception was written to the log file

Launching using nvidia user at /home/nvidia/install_isolated provides the following:

nvidia@tegra-ubuntu:~/install_isolated$ ls
_setup_util.py bin env.sh etc include lib local_setup.bash local_setup.sh local_setup.zsh setup.bash setup.sh setup.zsh share
nvidia@tegra-ubuntu:~/install_isolated$ source local_setup.bash
nvidia@tegra-ubuntu:~/install_isolated$ roscore
… logging to /home/nvidia/.ros/log/84086454-1d2e-11eb-a56f-00044bf65e6d/roslaunch-tegra-ubuntu-3880.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://tegra-ubuntu:41079/
ros_comm version 1.14.9

SUMMARY

PARAMETERS

  • /rosdistro: melodic
  • /rosversion: 1.14.9

NODES

auto-starting new master
process[master]: started with pid [3890]
ROS_MASTER_URI=http://tegra-ubuntu:11311/

setting /run_id to 84086454-1d2e-11eb-a56f-00044bf65e6d
process[rosout-1]: started with pid [3901]
started core service [/rosout]
^C[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor…
… shutting down processing monitor complete
done

Is this the error? Could you point out for me? Thanks!

The error is the following

Resource not found: roslaunch
ROS path [0]=/usr/share

I didn’t see the issue. Below are my steps. FYR.

nvidia@tegra-ubuntu:/opt/ros$ sudo mv ~/install_isolated/ melodic/
nvidia@tegra-ubuntu:/opt/ros$ source /opt/ros/melodic/setup.bash
nvidia@tegra-ubuntu:/opt/ros$ roscore 
... logging to /home/nvidia/.ros/log/2b0f267a-1d3e-11eb-b094-00044ba4e4d1/roslaunch-tegra-ubuntu-4840.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://tegra-ubuntu:35327/
ros_comm version 1.14.4


SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.4

NODES

auto-starting new master
process[master]: started with pid [4850]
ROS_MASTER_URI=http://tegra-ubuntu:11311/

setting /run_id to 2b0f267a-1d3e-11eb-b094-00044ba4e4d1
process[rosout-1]: started with pid [4861]
started core service [/rosout]

@VickNV

Any way that I can share my generated cross-compiled ROS or get yours for comparison.

Please advise

Hi @jpvans, Please download it via https://drive.google.com/file/d/1u_i5L2z-SxrX6nnpoYyJtGbfhHGUxtzH/view?usp=sharing. Thanks!

Thanks. I think the problem was creating melodic folder using root instead of nvidia user.

Can you advise how to add additional ros packages to the cross-compilation?

It seems the installed_isolated only has bare-ROS stuff.

It depends on what ROS packages we fetch in ROS - How to cross compile ROS for DRIVE AGX Developer Kit with DRIVE Software 10.0 steps. Please refer to “2.1 Create a catkin Workspace” of http://wiki.ros.org/melodic/Installation/Source. Thanks!

I followed the steps to generate the desktop version but hit an error in here:

==> Processing plain cmake package: ‘orocos_kdl’
==> Creating build directory: ‘build_isolated/orocos_kdl/install’
==> Building with env: ‘/home/jvilela/ros_catkin_ws/install_isolated/env.sh’
==> cmake /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl -DCMAKE_INSTALL_PREFIX=/home/jvilela/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/home/jvilela/ros_catkin_ws/Toolchain-V5L.cmake -G Unix Makefiles in ‘/home/jvilela/ros_catkin_ws/build_isolated/orocos_kdl/install’
– The C compiler identification is GNU 7.3.1
– The CXX compiler identification is GNU 7.3.1
– Check for working C compiler: /opt/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc
– Check for working C compiler: /opt/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /opt/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++
– Check for working CXX compiler: /opt/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Orocos KDL version (1.4.0)
– Build type set to ‘Release’ by user.
– Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) (Required is at least version “2.91.0”)
– Performing Test HAVE_STL_CONTAINER_INCOMPLETE_TYPES
– Performing Test HAVE_STL_CONTAINER_INCOMPLETE_TYPES - Success
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
EIGEN3_INCLUDE_DIR (ADVANCED)
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/doc
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/doc
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/doc
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/doc
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/doc
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/doc
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/doc
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/src
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/src
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/src
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/src
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/src
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/src
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/src
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/tests
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/tests
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/tests
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/tests
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/tests
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/tests
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/models
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/models
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/models
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/models
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/models
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/models
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/examples
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/examples
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/examples
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/examples
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/examples
used as include directory in directory /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl/examples

– Configuring incomplete, errors occurred!
See also “/home/jvilela/ros_catkin_ws/build_isolated/orocos_kdl/install/CMakeFiles/CMakeOutput.log”.
<== Failed to process package ‘orocos_kdl’:
Command ‘[’/home/jvilela/ros_catkin_ws/install_isolated/env.sh’, ‘cmake’, ‘/home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl’, ‘-DCMAKE_INSTALL_PREFIX=/home/jvilela/ros_catkin_ws/install_isolated’, ‘-DCMAKE_BUILD_TYPE=Release’, ‘-DCMAKE_TOOLCHAIN_FILE=/home/jvilela/ros_catkin_ws/Toolchain-V5L.cmake’, ‘-G’, ‘Unix Makefiles’]’ returned non-zero exit status 1

Reproduce this error by running:
==> cd /home/jvilela/ros_catkin_ws/build_isolated/orocos_kdl && /home/jvilela/ros_catkin_ws/install_isolated/env.sh cmake /home/jvilela/ros_catkin_ws/src/orocos_kinematics_dynamics/orocos_kdl -DCMAKE_INSTALL_PREFIX=/home/jvilela/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/home/jvilela/ros_catkin_ws/Toolchain-V5L.cmake -G ‘Unix Makefiles’

Command failed, exiting.

Can you confirm desktop ROS can be cross-compiled without issues on your side?

Hi @jpvans,

Please create another topic for this. Sorry for any inconvenience!