ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Confused with raspberry pi ros setup. It seems like I have 3 instalations. Ros Noetic

asked 2020-09-03 09:55:38 -0500

Tobmei gravatar image

updated 2020-09-03 11:08:28 -0500

So i'm working on a Project where I use an Raspberry Pi. As I need Python3 i installed Ros Noetic with this tutorial: [https://varhowto.com/install-ros-noet...]

After building It I have kind of 2 installations. I have the one in opt/ros/noetic but also one in ros_catkin_ws_src. In my ros_catkin_ws/src there the same files as in opt. Even the "genpy" "rosconsole" etc. To source my environment I had to use source/devel_isolated/setup.bash. I tested ros with only this setup. It worked fine I was able to launch the roscore and communicate with my Ros on my main Ubuntu Laptop.

Then I tried to create my own package. As my Raspberry was crashing everytime I used catkin_ make (it would install every standard Ros package again), I build my package with catkin_make -DCATKIN_WHITELIST_PACKAGES="ranger_bot". Now I have 2 Ros in my Workspace. I have following: build, build_isolated, devel, devel_isolated, src. The not isolated ones wheren't there before.

Then following appears: I source from my devel_isolated/setup.bash: Roscore works, but I can't find my package. Roscd or Rosrun don't work.

I source from my ~/opt/ros/noetic/setup.bash: Roscore works, but I can't find my package. Roscd or Rosrun don't work.

I source from my devel/setup.bash: I am able to find my package. I can use roscd ranger_bot. But if I'm trying to run the core it won't Work.

If someone could explain to me why I have this weird Filesystem. How to use it Properly or how to fix it?

Oky I found something that works: If I use sudo src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/noetic -j1 -DPYTHON_EXECUTABLE=/usr/bin/python3 Now I can find my build package. But I'm still completly confuses what my file-system is.

But now I have my package in /opt/ros/noetic/share So i have to put my code into that src folder

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-09-03 11:55:41 -0500

Tobmei gravatar image

I have no clue what exactly is going on in my ros_catkin_ws (which was build during the instalation from this website) I just made a completly new workspace and simply used catkin_make and it worked perfectly. I also just build my first own package without problems. I think I'm just going to ignore that Workspace and gonna use my own. I hope that should do it

edit flag offensive delete link more
0

answered 2020-09-04 01:57:50 -0500

mgruhler gravatar image

Please note that the guide you followed is NOT from the ROS wiki, and, as far as I can tell, not in any way related to anything "official" from OSRF. So it might very well be that it contains quite a few strange things.

Quickly reading through it, it seems that Steps 1-5 are pretty much standard- Whereas the rest of the steps are instructions for a source install of the full ROS distro (which you installed from apt in steps 1-5). You won't need both, usually, but only one or the other.

Also note, that Python3 is the supported version for noetic, so I'm not sure why you would deviate from the standard ROS installation instructions...

As to you problems:

  1. Installing anything from ROS via apt-get will put the resulting executables and other artifacts into /opt/ros/noetic.
  2. Installing packages from a workspace with the --install flag usually installs in $(PATH_TO_WORKSPACE)/install, unless, as is done in the tutorial, you specify the --install-space /opt/ros/noetic flag, which again installs into /opt/ros/noetic. I would highly discourage to do this for a development package and anything that is not only a from source install.
  3. Note that there is a difference between caktin_make and caktin_make_isolated. This is why you get both, the build/devel and build_isolated/devel_isolated folders. See #q320613 for an overview of the different options.
  4. Note that the isolated and regular directories are two different builds of the same source workspace! I.e. why you cannot find your package built in non-isolation when sourcing the isolated workspace.
  5. If you really install your development package into /opt

    Oky I found something that works: If I use sudo src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/noetic -j1 -DPYTHON_EXECUTABLE=/usr/bin/python3 Now I can find my build package. But I'm still completly confuses what my file-system is.

    But now I have my package in /opt/ros/noetic/share So i have to put my code into that src folder

    your code still lives in your workspace, but if you compile, you have to install every time to get the new packae replaced.

You are correct in your "solution", that simply compiling your new workspace and ignoring the one created in step 6 of the tutorial is the way to go.

I'd even suggest to set up your raspberry again from scratch and follow the standard install guides. There might be quite a few things that have been messed up with the source install into /opt and that updates won't work...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-09-03 09:55:38 -0500

Seen: 278 times

Last updated: Sep 04 '20