Closed wyd0817 closed 1 year ago
Can you please provide the exact commands that you run, and some way that we can easily replicate the error?
Thank you for your quick response.
I ran the following command.
source/install.setup.bash
Here is a screenshot of what I did.
BTW, I was able to successfully compile the ros2 project.
What is contained in your colcon_ws?
There is only one ros_tcp_endpoint open source library.
Can you list all files in the colcon_ws?
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
Can you try sourcing the zsh?
I source zsh, then my conda environment becomes (base), here is an output.
Can you clean your colcon ws, then in a new terminal activate your robostack environment, then build the ws and try again?
The unfortunate news, the result is the same.
I cannot replicate your issue. Please:
mamba install colcon-ros
mkdir -p ~/colcon_ws_new/src && git clone https://github.com/Unity-Technologies/ROS-TCP-Endpoint
cd ROS-TCP-Endpoint; git checkout main-ros2
cd ~/colcon_ws_new
colcon build --symlink-install
. install/setup.sh
(see https://docs.ros.org/en/foxy/Tutorials/Beginner-Client-Libraries/Colcon-Tutorial.html)ros2 launch ros_tcp_endpoint endpoint.py
These exact steps worked for me just then. Feel free to reopen if you still have issues.
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.
I can run some demos, like turtlesim, but when I source my workspace (source/install.setup.bash), I get the following error