Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install ROS1 Melodic on ubuntu 22 #3

Open
lemonci opened this issue Nov 18, 2024 · 17 comments
Open

How to install ROS1 Melodic on ubuntu 22 #3

lemonci opened this issue Nov 18, 2024 · 17 comments

Comments

@lemonci
Copy link

lemonci commented Nov 18, 2024

As you suggested the "The pipeline has been tested on Ubuntu 22.04." and ROS1 Melodic is in the requirement list, could you suggest how you managed to install ROS1 Melodic on ubuntu 22? If you used docker, can you provide the container? Thanks.

@peasant98
Copy link
Contributor

peasant98 commented Nov 18, 2024

Hi @lemonci, thanks for checking out our repo!

I realized that I mistyped the version of ROS we used -- we actually used ROS1 Noetic. Here is the publicly available Dockerfile:

https://hub.docker.com/r/peasant98/active-touch-gs

It is a little beefy, let me know if you have any questions! I'll also add the Dockerfile to the readme.

@peasant98
Copy link
Contributor

Hi @lemonci, any update for this? Thx!

@lemonci
Copy link
Author

lemonci commented Dec 13, 2024

Hi @lemonci, any update for this? Thx!

Hi Matt, sorry I am still struggling with this. I will give you an update by the end of this weekend if this issue can be close. Thanks!

@peasant98
Copy link
Contributor

No problem -- let me know if you need any help! We are working on making the README steps more clear.

@peasant98
Copy link
Contributor

Hi @lemonci, we have updated the README with more comprehensive Docker steps:

https://github.com/armlabstanford/NextBestSense

@lemonci
Copy link
Author

lemonci commented Dec 22, 2024

Hi @lemonci, we have updated the README with more comprehensive Docker steps:

https://github.com/armlabstanford/NextBestSense

Hi Matt, I tried to run

docker run --privileged -it --rm -p 7007:7007 --name nbs --hostname nbs --volume=/tmp/.X11-unix:/tmp/.X11-unix \\ -v pwd/FisherRF-ns:/home/user/FisherRF-ns -v pwd/NextBestSense:/home/user/NextBestSense --device=/dev/dri:/dev/dri \\ --device=/dev/ttyUSB0:/dev/ttyUSB0 --env="DISPLAY=$DISPLAY" -e "TERM=xterm-256color" --cap-add SYS_ADMIN --device /dev/fuse \\ --gpus all -it peasant98/active-touch-gs:latest bash

And got an error
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

So I guess there is a problem with /dev/ttyUSB0:/dev/ttyUSB0 as we do not have a external disk?

@peasant98
Copy link
Contributor

Hi @lemonci,

I think this comes down to the missing nvidia-cuda-toolkit (https://stackoverflow.com/questions/75118992/docker-error-response-from-daemon-could-not-select-device-driver-with-capab) issue. I would check that out (assuming you have a GPU).

@lemonci
Copy link
Author

lemonci commented Jan 10, 2025

Hi @peasant98 , after installing nvidia-docker, the commands can be run. However, as the user name on our machine is not user, I get the following error:

sudo docker run --privileged -it --rm -p 7007:7007 --name nbs --hostname nbs --volume=/tmp/.X11-unix:/tmp/.X11-unix -v `pwd`/FisherRF-ns:/home/mistlab/FisherRF-ns -v `pwd`/NextBestSense:/home/mistlab/NextBestSense --device=/dev/dri:/dev/dri --device=/dev/ttyUSB0:/dev/ttyUSB0 --env="DISPLAY=$DISPLAY" -e "TERM=xterm-256color" --cap-add SYS_ADMIN --device /dev/fuse --gpus all -it peasant98/active-touch-gs:latest bash
[sudo] password for mistlab: 

==========
== CUDA ==
==========

CUDA Version 12.1.0

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

*************************
** DEPRECATION NOTICE! **
*************************
THIS IMAGE IS DEPRECATED and is scheduled for DELETION.
    https://gitlab.com/nvidia/container-images/cuda/blob/master/doc/support-policy.md

bash: /home/user/NextBestSense/devel/setup.bash: No such file or directory

I suppose there are some hard-coded path variables in the code?

@lemonci
Copy link
Author

lemonci commented Jan 12, 2025

Hi Matt, despite the previous error, I continued to install FisherRF-ns and compile NextBestSense. And here's the error I got

 🐳   user  nbs  home  mistlab  $  cd NextBestSense/ && catkin build
------------------------------------------------------------------------------------------------------
Profile:                     default
Extending:             [env] /home/user/catkin_ws/devel:/home/user/ros_kortex_ws/devel:/opt/ros/noetic
Workspace:                   /home/mistlab/NextBestSense
------------------------------------------------------------------------------------------------------
Build Space:        [exists] /home/mistlab/NextBestSense/build
Devel Space:        [exists] /home/mistlab/NextBestSense/devel
Install Space:      [unused] /home/mistlab/NextBestSense/install
Log Space:         [missing] /home/mistlab/NextBestSense/logs
Source Space:       [exists] /home/mistlab/NextBestSense/src
DESTDIR:            [unused] None
------------------------------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
------------------------------------------------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
------------------------------------------------------------------------------------------------------
Buildlisted Packages:        None
Skiplisted Packages:         None
------------------------------------------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
------------------------------------------------------------------------------------------------------
[build] Found 3 packages in 0.0 seconds.                                                                                                                                  
[build] Updating package table.                                                                                                                                           
Starting  >>> catkin_tools_prebuild                                                                                                                                       
Finished  <<< catkin_tools_prebuild                [ 1.7 seconds ]                                                                                                        
Starting  >>> DenseTactNode                                                                                                                                               
Starting  >>> gaussian_splatting                                                                                                                                          
Starting  >>> kinova_control                                                                                                                                              
__________________________________________________________________________________________________________________________________________________________________________
Errors     << kinova_control:cmake /home/mistlab/NextBestSense/logs/kinova_control/build.cmake.000.log                                                                    
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "gaussian_splatting" with any of the following names:

    gaussian_splattingConfig.cmake
    gaussian_splatting-config.cmake

  Add the installation prefix of "gaussian_splatting" to CMAKE_PREFIX_PATH or
  set "gaussian_splatting_DIR" to a directory containing one of the above
  files.  If "gaussian_splatting" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:10 (find_package)


cd /home/mistlab/NextBestSense/build/kinova_control; catkin build --get-env kinova_control | catkin env -si  /usr/bin/cmake /home/mistlab/NextBestSense/src/kinova_control --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/mistlab/NextBestSense/devel/.private/kinova_control -DCMAKE_INSTALL_PREFIX=/home/mistlab/NextBestSense/install; cd -

..........................................................................................................................................................................
Failed     << kinova_control:cmake                 [ Exited with code 1 ]                                                                                                 
Failed    <<< kinova_control                       [ 0.9 seconds ]                                                                                                        
__________________________________________________________________________________________________________________________________________________________________________
Warnings   << DenseTactNode:cmake /home/mistlab/NextBestSense/logs/DenseTactNode/build.cmake.000.log                                                                      
*** Arguments ['zip_safe'] to setup() not supported in catkin devel space in setup.py of DenseTactNode
WARNING: Package name "DenseTactNode" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "DenseTactNode" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
cd /home/mistlab/NextBestSense/build/DenseTactNode; catkin build --get-env DenseTactNode | catkin env -si  /usr/bin/cmake /home/mistlab/NextBestSense/src/DenseTactNode --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/mistlab/NextBestSense/devel/.private/DenseTactNode -DCMAKE_INSTALL_PREFIX=/home/mistlab/NextBestSense/install; cd -

..........................................................................................................................................................................
Finished  <<< DenseTactNode                        [ 1.3 seconds ]                                                                                                        
__________________________________________________________________________________________________________________________________________________________________________
Warnings   << gaussian_splatting:cmake /home/mistlab/NextBestSense/logs/gaussian_splatting/build.cmake.000.log                                                            
*** Arguments ['zip_safe'] to setup() not supported in catkin devel space in setup.py of gaussian_splatting
cd /home/mistlab/NextBestSense/build/gaussian_splatting; catkin build --get-env gaussian_splatting | catkin env -si  /usr/bin/cmake /home/mistlab/NextBestSense/src/gaussian_splatting --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/mistlab/NextBestSense/devel/.private/gaussian_splatting -DCMAKE_INSTALL_PREFIX=/home/mistlab/NextBestSense/install; cd -

..........................................................................................................................................................................
__________________________________________________________________________________________________________________________________________________________________________
Warnings   << gaussian_splatting:make /home/mistlab/NextBestSense/logs/gaussian_splatting/build.make.000.log                                                              
WARNING: Package name "DenseTactNode" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "DenseTactNode" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
cd /home/mistlab/NextBestSense/build/gaussian_splatting; catkin build --get-env gaussian_splatting | catkin env -si  /usr/bin/make --jobserver-auth=3,4; cd -

..........................................................................................................................................................................
Finished  <<< gaussian_splatting                   [ 2.3 seconds ]                                                                                                        
[build] Summary: 3 of 4 packages succeeded.                                                                                                                               
[build]   Ignored:   None.                                                                                                                                                
[build]   Warnings:  2 packages succeeded with warnings.                                                                                                                  
[build]   Abandoned: None.                                                                                                                                                
[build]   Failed:    1 packages failed.                                                                                                                                   
[build] Runtime: 4.1 seconds total.                                                                                                                                       
[build] Note: Workspace packages have changed, please re-source setup files to use them.
 🐳   user  nbs  home  mistlab  NextBestSense  main  3?  2  $  find_package(gaussian_splatting)
bash: syntax error near unexpected token `gaussian_splatting'
 🐳   user  nbs  home  mistlab  NextBestSense  main  3?  $  cd ~
 🐳   user  nbs  ~  $  find_package(gaussian_splatting)
bash: syntax error near unexpected token `gaussian_splatting'

Any suggestion? Thanks.

@peasant98
Copy link
Contributor

Hi @peasant98 , after installing nvidia-docker, the commands can be run. However, as the user name on our machine is not user, I get the following error:

sudo docker run --privileged -it --rm -p 7007:7007 --name nbs --hostname nbs --volume=/tmp/.X11-unix:/tmp/.X11-unix -v `pwd`/FisherRF-ns:/home/mistlab/FisherRF-ns -v `pwd`/NextBestSense:/home/mistlab/NextBestSense --device=/dev/dri:/dev/dri --device=/dev/ttyUSB0:/dev/ttyUSB0 --env="DISPLAY=$DISPLAY" -e "TERM=xterm-256color" --cap-add SYS_ADMIN --device /dev/fuse --gpus all -it peasant98/active-touch-gs:latest bash
[sudo] password for mistlab: 

==========
== CUDA ==
==========

CUDA Version 12.1.0

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

*************************
** DEPRECATION NOTICE! **
*************************
THIS IMAGE IS DEPRECATED and is scheduled for DELETION.
    https://gitlab.com/nvidia/container-images/cuda/blob/master/doc/support-policy.md

bash: /home/user/NextBestSense/devel/setup.bash: No such file or directory

I suppose there are some hard-coded path variables in the code?

Hi @lemonci, we do have this hardcoded in the bashrc. My apologies -- we will push a newer Docker image this week fixing. However, you can effectively ignore this error (it shouldn't mess up other stuff)

@peasant98
Copy link
Contributor

Hi Matt, despite the previous error, I continued to install FisherRF-ns and compile NextBestSense. And here's the error I got

 🐳   user  nbs  home  mistlab  $  cd NextBestSense/ && catkin build
------------------------------------------------------------------------------------------------------
Profile:                     default
Extending:             [env] /home/user/catkin_ws/devel:/home/user/ros_kortex_ws/devel:/opt/ros/noetic
Workspace:                   /home/mistlab/NextBestSense
------------------------------------------------------------------------------------------------------
Build Space:        [exists] /home/mistlab/NextBestSense/build
Devel Space:        [exists] /home/mistlab/NextBestSense/devel
Install Space:      [unused] /home/mistlab/NextBestSense/install
Log Space:         [missing] /home/mistlab/NextBestSense/logs
Source Space:       [exists] /home/mistlab/NextBestSense/src
DESTDIR:            [unused] None
------------------------------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
------------------------------------------------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
------------------------------------------------------------------------------------------------------
Buildlisted Packages:        None
Skiplisted Packages:         None
------------------------------------------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
------------------------------------------------------------------------------------------------------
[build] Found 3 packages in 0.0 seconds.                                                                                                                                  
[build] Updating package table.                                                                                                                                           
Starting  >>> catkin_tools_prebuild                                                                                                                                       
Finished  <<< catkin_tools_prebuild                [ 1.7 seconds ]                                                                                                        
Starting  >>> DenseTactNode                                                                                                                                               
Starting  >>> gaussian_splatting                                                                                                                                          
Starting  >>> kinova_control                                                                                                                                              
__________________________________________________________________________________________________________________________________________________________________________
Errors     << kinova_control:cmake /home/mistlab/NextBestSense/logs/kinova_control/build.cmake.000.log                                                                    
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "gaussian_splatting" with any of the following names:

    gaussian_splattingConfig.cmake
    gaussian_splatting-config.cmake

  Add the installation prefix of "gaussian_splatting" to CMAKE_PREFIX_PATH or
  set "gaussian_splatting_DIR" to a directory containing one of the above
  files.  If "gaussian_splatting" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:10 (find_package)


cd /home/mistlab/NextBestSense/build/kinova_control; catkin build --get-env kinova_control | catkin env -si  /usr/bin/cmake /home/mistlab/NextBestSense/src/kinova_control --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/mistlab/NextBestSense/devel/.private/kinova_control -DCMAKE_INSTALL_PREFIX=/home/mistlab/NextBestSense/install; cd -

..........................................................................................................................................................................
Failed     << kinova_control:cmake                 [ Exited with code 1 ]                                                                                                 
Failed    <<< kinova_control                       [ 0.9 seconds ]                                                                                                        
__________________________________________________________________________________________________________________________________________________________________________
Warnings   << DenseTactNode:cmake /home/mistlab/NextBestSense/logs/DenseTactNode/build.cmake.000.log                                                                      
*** Arguments ['zip_safe'] to setup() not supported in catkin devel space in setup.py of DenseTactNode
WARNING: Package name "DenseTactNode" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "DenseTactNode" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
cd /home/mistlab/NextBestSense/build/DenseTactNode; catkin build --get-env DenseTactNode | catkin env -si  /usr/bin/cmake /home/mistlab/NextBestSense/src/DenseTactNode --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/mistlab/NextBestSense/devel/.private/DenseTactNode -DCMAKE_INSTALL_PREFIX=/home/mistlab/NextBestSense/install; cd -

..........................................................................................................................................................................
Finished  <<< DenseTactNode                        [ 1.3 seconds ]                                                                                                        
__________________________________________________________________________________________________________________________________________________________________________
Warnings   << gaussian_splatting:cmake /home/mistlab/NextBestSense/logs/gaussian_splatting/build.cmake.000.log                                                            
*** Arguments ['zip_safe'] to setup() not supported in catkin devel space in setup.py of gaussian_splatting
cd /home/mistlab/NextBestSense/build/gaussian_splatting; catkin build --get-env gaussian_splatting | catkin env -si  /usr/bin/cmake /home/mistlab/NextBestSense/src/gaussian_splatting --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/mistlab/NextBestSense/devel/.private/gaussian_splatting -DCMAKE_INSTALL_PREFIX=/home/mistlab/NextBestSense/install; cd -

..........................................................................................................................................................................
__________________________________________________________________________________________________________________________________________________________________________
Warnings   << gaussian_splatting:make /home/mistlab/NextBestSense/logs/gaussian_splatting/build.make.000.log                                                              
WARNING: Package name "DenseTactNode" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "DenseTactNode" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
cd /home/mistlab/NextBestSense/build/gaussian_splatting; catkin build --get-env gaussian_splatting | catkin env -si  /usr/bin/make --jobserver-auth=3,4; cd -

..........................................................................................................................................................................
Finished  <<< gaussian_splatting                   [ 2.3 seconds ]                                                                                                        
[build] Summary: 3 of 4 packages succeeded.                                                                                                                               
[build]   Ignored:   None.                                                                                                                                                
[build]   Warnings:  2 packages succeeded with warnings.                                                                                                                  
[build]   Abandoned: None.                                                                                                                                                
[build]   Failed:    1 packages failed.                                                                                                                                   
[build] Runtime: 4.1 seconds total.                                                                                                                                       
[build] Note: Workspace packages have changed, please re-source setup files to use them.
 🐳   user  nbs  home  mistlab  NextBestSense  main  3?  2  $  find_package(gaussian_splatting)
bash: syntax error near unexpected token `gaussian_splatting'
 🐳   user  nbs  home  mistlab  NextBestSense  main  3?  $  cd ~
 🐳   user  nbs  ~  $  find_package(gaussian_splatting)
bash: syntax error near unexpected token `gaussian_splatting'

Any suggestion? Thanks.

For this, do you have the gaussian_splatting part of our repo cloned?

gaussian_splatting

@peasant98
Copy link
Contributor

Also, could you try directly building the gaussian_splatting individually? This might reveal the issue.

@lemonci
Copy link
Author

lemonci commented Jan 27, 2025

Also, could you try directly building the gaussian_splatting individually? This might reveal the issue.

Hi Matt, after trying different options. I think I figured out the problem was that gaussian_splatting has to be built first before kinova_control and in your building script it was the other way round. That's why we had the error

Errors     << kinova_control:cmake /home/mistlab/NextBestSense/logs/kinova_control/build.cmake.000.log                                                                    
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "gaussian_splatting" with any of the following names:

    gaussian_splattingConfig.cmake
    gaussian_splatting-config.cmake

  Add the installation prefix of "gaussian_splatting" to CMAKE_PREFIX_PATH or
  set "gaussian_splatting_DIR" to a directory containing one of the above
  files.  If "gaussian_splatting" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:10 (find_package)

Also, there are some other things to update in the ReadMe:

  1. In the session "To mount our code within the Docker container, clone it as follows", after cloning modified-diff-gaussian-rasterization-w-depth, we have to exit from the FisherRF-ns path. Otherwise after launching the docker, FisherRF-ns and NextBestSense cannot be found.
  2. The users have to sudo apt-get install libglm-dev, otherwise <glm/glm.hpp> cannot be found when installing FisherRF-ns/
  3. We need to rm -rf ~/.catkin_tools after installing FisherRF-ns, otherwise there will be Error of catkin build: Unable to find source space.
  4. We need to sudo apt install ros-noetic-kdl-parser-py inside the docker.
  5. Under Getting Next Best Sense Setup, when we catkin build, it should be inside the NextBestSense dir (ROS workspace) instead of outside. Actually this catkin build is not necessary because we have already built everything in the installation step.
  6. It should be source devel/setup.bash instead of source install/setup.bash under Getting Next Best Sense Setup and Training part, as it is ROS1.

Finally, I need your help about Getting Next Best Sense Setup and Training part. May I ask which path I should be in when I source install/setup.bash ?

@peasant98
Copy link
Contributor

Hi @lemonci , thank for the tips to update in the Readme. I will update it tomorrow -- I had a lot of this stuff on my system before. I am planning to reinstall this work myself from scratch to see what issues may come up along the way. I will report back this week!!

@lemonci
Copy link
Author

lemonci commented Jan 28, 2025

Hi Matt,

Thanks for your prompt and kind reply! I have added some errors I encountered and the way to fix them in the previous reply.

~~ My current issue is the "Getting Next Best Sense Setup and Training part", when I try to catkin build inside the docker at the home path , there is the error: [build] Error: Unable to find source space /home/user/src`

So I would like to make sure what path this build is handling, as indeed there is no src under the home path. ~~

Also, congratulations for your ICRA acceptance!

@peasant98
Copy link
Contributor

Hi @lemonci, I was a bit busy with another paper this week so I shall get to this in the weekend and early week. Sorry for the delay!

@lemonci
Copy link
Author

lemonci commented Feb 3, 2025

Hi @lemonci, I was a bit busy with another paper this week so I shall get to this in the weekend and early week. Sorry for the delay!

Hi Matt, no problem! Take your time and we are looking forward to see your future work~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants