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

Added Windows build instructions to README #50

Merged
merged 2 commits into from
Jul 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,32 @@ You can get details about a specific element using a command like `source ~/gala

If you inspect the plugin `gst-inspect-1.0` without your environment set up, it will fail missing shared objects.

## Building (Windows)
Install ROS 2 ([instructions for Windows (Humble)](https://docs.ros.org/en/humble/Installation/Windows-Install-Binary.html))

Install GStreamer ([official prebuilt](https://gstreamer.freedesktop.org/download/))
You'll need both the runtime and developmental installers for MSVC 64-bit. It's best to select "Complete" during both installations.

Add GStreamer bin dir to Path (e.g. `C:\gstreamer\1.0\msvc_x86_64\bin` )

Open a `x64 Native Tools Command Prompt for VS 2019 Command Prompt`

If you do not yet have a ROS2 workspace, create one ( e.g. `mkdir \dev_ws\src` )

Clone this repo under the src/ folder of your ROS2 workspace ( `git clone https://github.com/BrettRD/ros-gst-bridge.git \dev_ws\src\ros-gst-bridge` )

The ros tools colcon needs to know about your system version of ros, so make sure your environment is set up now: ( `call \dev\ros2_humble\local_setup.bat` )

Navigate to your workspace (e.g. `cd \dev_ws`)

On Windows, ROS 2 packages are generally built with `--merge-install` due to file path limits.
```
colcon build --merge-install
```
If `--merge-install` is used, to run the examples the `--gst-plugin-path` needs to changed to `--gst-plugin-path=install/lib/gst_bridge/`
* Example - Generate test video and publish as ROS sensor_msgs /image
`gst-launch-1.0 --gst-plugin-path=install/lib/gst_bridge/ videotestsrc ! videoconvert ! rosimagesink ros-topic="image"`


## Licenses
* gst_pipeline: LGPLv3, depends on gstreamer (LGPLv2.1+)
Expand Down
1 change: 1 addition & 0 deletions gst_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ target_link_libraries(rosgstbridge PUBLIC
${audio_msgs_LIBRARIES}
${GLIB_LIBRARIES}
${GLIB_GIO_LIBRARIES}
${GLIB_GOBJECT_LIBRARIES}
${GSTREAMER_LIBRARIES}
${GSTREAMER_AUDIO_LIBRARIES}
${GSTREAMER_APP_LIBRARIES}
Expand Down