Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/klintan/ros2_pytorch
ROS2 PyTorch template node - running PyTorch C++ models in ROS2
https://github.com/klintan/ros2_pytorch
Last synced: 3 months ago
JSON representation
ROS2 PyTorch template node - running PyTorch C++ models in ROS2
- Host: GitHub
- URL: https://github.com/klintan/ros2_pytorch
- Owner: klintan
- License: apache-2.0
- Created: 2019-04-09T07:28:56.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-14T05:12:11.000Z (almost 6 years ago)
- Last Synced: 2024-08-05T00:04:21.211Z (6 months ago)
- Language: C++
- Size: 40.4 MB
- Stars: 39
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ROS2 PyTorch node
Run a PyTorch model in C++ in ROS2. A template node to be able to adapt to whatever model you want to run, for instance object detection of people and bikes.
Features
-There might be major changes to the code as it is a WIP.
### Topics
`/` - topic for## Build and installation
Make sure to run setup.bash and local_setup.bash for your ROS2 environment for all dependencies or symlink them into the repo.Add Libtorch to your `CMAKE_PREFIX_PATH` env variable, like so:
```
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/path/to/libtorch
```Add CV_Bridge as well if its not already on your `CMAKE_PREFIX_PATH`
`export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:`
(If its built using `colcon build` this is the path to `cv_bridge` folder in the `install` folder.)
Run
`colcon build`
Unfortunately you also have to copy two libs from https://github.com/intel/mkl-dnn/releases into the libtorch lib folder.
`libmklml.dylib`
`libiomp5.dylib`## Usage
`ros2 run ros2_pytorch ros2_pytorch_node`
## References