Skip to content

Add simple tutorial, update MyRobot example, provide uv environment#1042

Merged
m3d merged 6 commits intomasterfrom
feature/tutorial
Mar 11, 2026
Merged

Add simple tutorial, update MyRobot example, provide uv environment#1042
m3d merged 6 commits intomasterfrom
feature/tutorial

Conversation

@m3d
Copy link
Copy Markdown
Member

@m3d m3d commented Mar 9, 2026

This PR is a result of experiments with Gemini CLI (model 2.5 and 3.1). I consider the update of examples/myrobot as valuable although I am not that keen in copy the source to sphinx documentation. Also the uv.lock was "must have" to be able to get it running.

Elena Ai added 4 commits March 9, 2026 12:46
- Refactor myrobot.py to use Node.update() and on_* handlers instead of manual update()
- Update myapp.py to handle BusShutdownException for clean exit
- Remove deprecated myrobot-slots.json
- Update tutorial documentation to match the refactored code and corrected run command
- Register emergency_stop output in myrobot driver and update myrobot.json
- Replace custom MyTimer with built-in timer driver in myrobot.json and tutorial
- Remove MyTimer class from myrobot.py
- Define app driver directly as myapp:MyApp in myrobot.json
- Update tutorial with simplified run command (no --application flag needed)
@m3d m3d requested review from tajgr and zbynekwinkler March 9, 2026 12:42
- Create .github/workflows/docs-deploy.yaml to build and deploy Sphinx docs to gh-pages
- Add doc/requirements.txt for Sphinx dependency
push:
branches:
- master
- feature/tutorial
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, thanks to this is https://robotika.github.io/osgar/ already automatically updated

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really? It is 2026.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you mean "very old Python version"? Well, some people still need the RealSense backward compatibility, but maybe there is already some replacement? Thanks for comments

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am currently trying to use version 3.12. Pyrealsense2 also works (At least here).
I don't know how to ARM platforms (RPi).

from osgar.node import Node


class MyRobot(Node):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is a tutorial, couldn't there be more comments?

def update_pose(self):
if self.last_update is not None:
t = (self.time - self.last_update).total_seconds()
self.speed = self.desired_speed # TODO motion model
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TODO things are confusing there.

Copy link
Copy Markdown
Collaborator

@tajgr tajgr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a start, okay.

@m3d m3d merged commit aae5b77 into master Mar 11, 2026
3 checks passed
@m3d m3d deleted the feature/tutorial branch March 11, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants