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

[DRAFT] Port Websocket server from gz-launch #2792

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Feb 20, 2025

Marked as draft to get CI working first

🎉 New feature

Related issue: gazebosim/gz-launch#288

Depends on these CI infra PRs:

Summary

Port websocket_server plugin and the example gzweb visualization demo from gz-launch. Main changes are:

  • converted the websocket server from a gz-launch plugin to a gz-sim system: i.e. gz-sim-websocket-server-system
    • updated to parse plugin params from SDF elements instead of using tinyxml
    • fixed various lint and compile warnings
  • moved example gzweb demo files to examples/scripts/websocket_server
    • it includes a websocket_server.sdf world for testing
  • Updated documentation in WebsocketServer.hh in the websocket_server system and README.md in the demo
  • Added libwesockets as optional dependency

Test it

There is a simple websocket server demo world with a gzweb web page in examples/scripts/websocket_server. See README.md in that directory.

In summary, you can try these following steps:

  1. Launch demo world with websocket server system

    cd examples/scripts/websocket_server
    gz sim -v 4 websocket_server.sdf -s
    
  2. Connect gzweb to the websocket server for web visualization. This can be done by either

    1. Opening examples/scripts/websocket_server/index.html (materials not working, same issue in gz-launch), or
    2. Visiting https://app.gazebosim.org/visualization and hit Connect
local_gzweb gazebosim_gzweb

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@iche033 iche033 requested a review from mjcarroll as a code owner February 20, 2025 23:47
@github-actions github-actions bot added the 🪵 jetty Gazebo Jetty label Feb 20, 2025
@iche033 iche033 changed the title [DARFT] Port Websocket server from gz-launch [DRAFT] Port Websocket server from gz-launch Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪵 jetty Gazebo Jetty
Projects
Status: Inbox
Development

Successfully merging this pull request may close these issues.

1 participant