How to install roscpp, sensor_msgs and pcl_ros on ubuntu?
I'm trying to compile a project that uses ROS. I don't know anything about ROS or catkin. I think ROS is a SDK for robots and catkin helps installing things. I know how CMake works. Here's my CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.3)
project(quanergy_client_ros)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS roscpp sensor_msgs pcl_ros )
The problem is that I can't find how to install these dependencies. I tried everything. Tried installing all ros related things, llike this: sudo apt install -y ros*. I tried building some of them from source, but I always end up with a project that depends on another project.
I then discovered rosdep, I installed but when I try it, I get
rosdep install roscpp ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: roscpp: No definition of [xmlrpcpp] for OS [debian]
The problem happens on debian but also on Ubuntu
I'm very confused on for what ROS, rosdep, catkin and other things are.
Can somebody help me?
Would these be the instructions you're looking for: wiki/melodic/Installation?
Also: according to this page, the repository that hosts that package contains quite extensive build instructions:
Did you not get those?
If not, I would suggest to ask Quanergy to support you.
@gvdhoorn I already did that but with an older version. I just tried now with melodic. After the installation, running rosdep install roscpp gives me ERROR: Rosdep cannot find all required resources to answer your query Missing resource roscpp
So how should I install roscpp sensor_msgs pcl_ros so I can build my CMake file? And do I build with cmake or with another tool?
@gvdhoorn thanks, I tried those instructions you added, but they're old, the repositories don't exist anymore. I have a folder of the project which has a CMakeLists with the dependencies I listed above. So I need a way to install those dependencies. This is my only chance of making this work
@gvdhoorn I made 4 different docker images just to try lots of things on ubuntu bionix and xenial, I installed multiple ros SDKs, but I always end up with the problem of not finding roscpp and the other 2 dependencies. I actually compiled roscpp somehow but then for the other dependencies I had one dependency depending on other forever and gave up on trying to compile everything manually. Isn't there a way to simply install roscpp sensor_msgs pcl_ros?
We don't have access to the sources you have, so we cannot verify which specific set of commands will work for you, which specific dependencies the package you're trying to build has or whether it would only build successfully on certain versions of OS and/or ROS.
There is nothing specifically difficult about all of this, but exact information is required, as @marguedas also commented.
And please also indicate whether you are trying to get familiar with ROS to actually start using it, or whether you are trying to build this one package. If the latter: please spend a few words on why you want to build this package.
Thanks @marguedas and @gvdhoorn, I uploaded the source here: https://github.com/lucaszanella/qqq/t... could you take a look? At the top of this repo, you can find the docker folder for which you can build everything up to the part of where the error happens (cmake can find roscpp). Note that it compiles two projects because the last one depends on the first.