KineNestA safe place to learn robotics by making things move.SESSION 03

Python · 90 min

Perception & Services

SESSION 03

Loading lesson…

    Camera · /camera/image_raw

    320 × 240 · RGB · 8 Hz

    Waiting for image…

    No student detection reported

    Python

    Python not loaded

    Complete the TODOs, then Run. Tab indents; Escape then Tab leaves the editor. Stop terminates Python.

    Loading…

    Robot

    Graph

    TF frames
    Parameters
    Action progress

    Learning terminals

    Use a second terminal to observe messages. Ctrl+C stops a stream.

    Callbacks can update node state

    Store the latest detection on self so another callback can use it.

    self.target_visible = False
    self.target_position = 'UNKNOWN'
    
    # Inside image_callback, after processing pixels:
    self.target_visible = visible
    self.target_position = position

    Camera callback → node state → other callbacks.

    On a real ROS 2 machine

    On a real ROS 2 machine, use an ament_python package for Python or an ament_cmake package with rclcpp for C++. Declare dependencies in package.xml.

    For C++, CMakeLists.txt uses find_package, add_executable, ament_target_dependencies and install(TARGETS ...) to build and install the node. Build with colcon build, source the workspace setup, then launch with ros2 run.

    KineNest provides educational compatibility headers in the browser. The kinenest::report_* helpers record learning evidence; they are not native ROS 2 APIs. No package build runs here.

    Real environment

    Real Python and browser-compiled C++ with an educational robotics runtime. Technical details