Page 1 of 1

Cannot compile libsimExtROSInterface in Ubuntu 18.04

Posted: 14 Oct 2021, 05:19
by rgudwin
Hi,
I was using CoppeliaSim 4.1, with the libsimExtROSInterface compiled for my custom msg and srv files, which are necessary for my ROS simulation, and everything was running perfectly well. I am now trying to move to CoppeliaSim 4.2, but I cannot compile the ROS plugin for 4.2. All of this is because apparently, the programming/libPlugin/cmake/FindCoppeliaSim.cmake script is not compatible to be run in Ubuntu 18.04. It requires a version of CMAKE that is higher than 18.04 provides, and also Python 3.8+, when Ubuntu 18.04 only provides 3.6. I tried to manually install CMAKE and a higher Python version, but nothing seems to work. Despite Python 3.8 is already installed, I keep receiving the message:

Code: Select all

CMake Error at /ros/csim/programming/libPlugin/cmake/FindCoppeliaSim.cmake:195 (message):
  Python 3.8+ is required
I used an alias to make Python run version 3.8:

Code: Select all

alias python3=python3.8
and

Code: Select all

alias python=python3.8
Apparently, this is not enough ... I was not able to understand how the FindCoppeliaSim.cmake identifies the Python version. Maybe I need also to set some environment variable ?
Or maybe you can release a version of this script that is compatible with Ubuntu 18.04 ? I need to use 18.04 because I am using ROS Melodic from within a docker container, and canĀ“t change the Ubuntu version.
What should I do ?
Ricardo

Re: Cannot compile libsimExtROSInterface in Ubuntu 18.04

Posted: 15 Oct 2021, 07:59
by fferri
You need to make sure you have the version of programming/include, programming/common and programming/libPlugin provided with the 4.2.0 release, and not from git.

Additionally, you need to use the melodic branch of simExtROS (master is for noetic only):

Code: Select all

#shell
git -C ~/ros_ws/src/sim_ros_interface checkout melodic
where ~/ros_ws/src/sim_ros_interface is the path where you have cloned the simExtROS repository.