RoboStack / robostack.github.io

180 stars 20 forks source link

Source workspace gets a directory not found error #21

Closed wyd0817 closed 1 year ago

wyd0817 commented 1 year ago

I can run some demos, like turtlesim, but when I source my workspace (source/install.setup.bash), I get the following error

/Users/wyd/miniforge3/envs/ros_env/local_setup.bash:.:11: no such file or directory: /Users/wyd/colcon_ws/local_setup.sh
not found: "/Users/wyd/colcon_ws/local_setup.bash"
OS: macOS Ventura Version 13.3.1
ROS_DISTRO=humble
ROS_ETC_DIR=/Users/wyd/miniforge3/envs/ros_env/etc/ros
ROS_LOCALHOST_ONLY=0
ROS_OS_OVERRIDE=conda:osx
ROS_PYTHON_VERSION=3
ROS_VERSION=2
Tobias-Fischer commented 1 year ago

Can you please provide the exact commands that you run, and some way that we can easily replicate the error?

wyd0817 commented 1 year ago

Thank you for your quick response. I ran the following command. source/install.setup.bash Here is a screenshot of what I did.

image

BTW, I was able to successfully compile the ros2 project.

Tobias-Fischer commented 1 year ago

What is contained in your colcon_ws?

wyd0817 commented 1 year ago

There is only one ros_tcp_endpoint open source library.

image
Tobias-Fischer commented 1 year ago

Can you list all files in the colcon_ws?

wyd0817 commented 1 year ago

Sure, here's a list of colcon_ws:

tree     
.
├── build
│   ├── COLCON_IGNORE
│   └── ros_tcp_endpoint
│       ├── colcon_build.rc
│       ├── colcon_command_prefix_setup_py.sh
│       ├── colcon_command_prefix_setup_py.sh.env
│       ├── launch
│       │   └── endpoint.py -> /Users/wangyongdong/colcon_ws/src/ROS-TCP-Endpoint/launch/endpoint.py
│       ├── package.xml -> /Users/wangyongdong/colcon_ws/src/ROS-TCP-Endpoint/package.xml
│       ├── prefix_override
│       │   ├── __pycache__
│       │   │   └── sitecustomize.cpython-310.pyc
│       │   └── sitecustomize.py
│       ├── resource
│       │   └── ros_tcp_endpoint -> /Users/wangyongdong/colcon_ws/src/ROS-TCP-Endpoint/resource/ros_tcp_endpoint
│       ├── ros_tcp_endpoint -> /Users/wangyongdong/colcon_ws/src/ROS-TCP-Endpoint/ros_tcp_endpoint
│       ├── ros_tcp_endpoint.egg-info
│       │   ├── PKG-INFO
│       │   ├── SOURCES.txt
│       │   ├── dependency_links.txt
│       │   ├── entry_points.txt
│       │   ├── requires.txt
│       │   ├── top_level.txt
│       │   └── zip-safe
│       ├── setup.cfg -> /Users/wangyongdong/colcon_ws/src/ROS-TCP-Endpoint/setup.cfg
│       ├── setup.py -> /Users/wangyongdong/colcon_ws/src/ROS-TCP-Endpoint/setup.py
│       └── share
│           └── ros_tcp_endpoint
│               └── hook
│                   ├── pythonpath_develop.dsv
│                   ├── pythonpath_develop.ps1
│                   └── pythonpath_develop.sh
├── install
│   ├── COLCON_IGNORE
│   ├── _local_setup_util_ps1.py
│   ├── _local_setup_util_sh.py
│   ├── local_setup.bash
│   ├── local_setup.ps1
│   ├── local_setup.sh
│   ├── local_setup.zsh
│   ├── ros_tcp_endpoint
│   │   ├── lib
│   │   │   ├── python3.10
│   │   │   │   └── site-packages
│   │   │   │       └── ros-tcp-endpoint.egg-link
│   │   │   └── ros_tcp_endpoint
│   │   │       └── default_server_endpoint
│   │   └── share
│   │       ├── ament_index
│   │       │   └── resource_index
│   │       │       └── packages
│   │       │           └── ros_tcp_endpoint
│   │       ├── colcon-core
│   │       │   └── packages
│   │       │       └── ros_tcp_endpoint
│   │       └── ros_tcp_endpoint
│   │           ├── hook
│   │           │   ├── ament_prefix_path.dsv
│   │           │   ├── ament_prefix_path.ps1
│   │           │   ├── ament_prefix_path.sh
│   │           │   ├── pythonpath.dsv
│   │           │   ├── pythonpath.ps1
│   │           │   └── pythonpath.sh
│   │           ├── launch
│   │           │   └── endpoint.py
│   │           ├── package.bash
│   │           ├── package.dsv
│   │           ├── package.ps1
│   │           ├── package.sh
│   │           ├── package.xml
│   │           └── package.zsh
│   ├── setup.bash
│   ├── setup.ps1
│   ├── setup.sh
│   └── setup.zsh
├── log
│   ├── COLCON_IGNORE
│   ├── build_2023-04-19_14-58-57
│   │   ├── events.log
│   │   ├── logger_all.log
│   │   └── ros_tcp_endpoint
│   │       ├── command.log
│   │       ├── stderr.log
│   │       ├── stdout.log
│   │       ├── stdout_stderr.log
│   │       └── streams.log
│   ├── latest -> latest_build
│   └── latest_build -> build_2023-04-19_14-58-57
├── pure_pursuit.rviz
└── src
    └── ROS-TCP-Endpoint
        ├── CHANGELOG.md
        ├── CODE_OF_CONDUCT.md
        ├── CONTRIBUTING.md
        ├── LICENSE
        ├── README.md
        ├── launch
        │   └── endpoint.py
        ├── package.xml
        ├── requirements.txt
        ├── resource
        │   └── ros_tcp_endpoint
        ├── ros_tcp_endpoint
        │   ├── __init__.py
        │   ├── __pycache__
        │   │   ├── __init__.cpython-310.pyc
        │   │   ├── client.cpython-310.pyc
        │   │   ├── communication.cpython-310.pyc
        │   │   ├── default_server_endpoint.cpython-310.pyc
        │   │   ├── exceptions.cpython-310.pyc
        │   │   ├── publisher.cpython-310.pyc
        │   │   ├── server.cpython-310.pyc
        │   │   ├── service.cpython-310.pyc
        │   │   ├── subscriber.cpython-310.pyc
        │   │   ├── tcp_sender.cpython-310.pyc
        │   │   ├── thread_pauser.cpython-310.pyc
        │   │   └── unity_service.cpython-310.pyc
        │   ├── client.py
        │   ├── communication.py
        │   ├── default_server_endpoint.py
        │   ├── exceptions.py
        │   ├── publisher.py
        │   ├── server.py
        │   ├── service.py
        │   ├── subscriber.py
        │   ├── tcp_sender.py
        │   ├── thread_pauser.py
        │   └── unity_service.py
        ├── setup.cfg
        ├── setup.py
        └── test
            ├── test_copyright.py
            ├── test_flake8.py
            └── test_pep257.py
Tobias-Fischer commented 1 year ago

Can you try sourcing the zsh?

wyd0817 commented 1 year ago

I source zsh, then my conda environment becomes (base), here is an output.

image
Tobias-Fischer commented 1 year ago

Can you clean your colcon ws, then in a new terminal activate your robostack environment, then build the ws and try again?

wyd0817 commented 1 year ago

The unfortunate news, the result is the same.

Tobias-Fischer commented 1 year ago

I cannot replicate your issue. Please:

These exact steps worked for me just then. Feel free to reopen if you still have issues.

wyd0817 commented 1 year ago

Thanks for your reply, I found the mistake. I made a particularly basic mistake, I was wrongly sourcing the .bash file in mac os, the correct one should be the .zsh file. That's it, it was fixed.