{"id":50727715,"url":"https://github.com/kernelshreyak/robotics","last_synced_at":"2026-06-10T05:32:16.736Z","repository":{"id":334090860,"uuid":"1095921062","full_name":"kernelshreyak/robotics","owner":"kernelshreyak","description":"Collection of my IoT and Robotics codes","archived":false,"fork":false,"pushed_at":"2026-03-17T16:17:06.000Z","size":11002,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-18T06:13:56.820Z","etag":null,"topics":["cad","circuit-design","circuits","freecad","industrial-robotics","iot","microcontrollers","robotics","simulation","webots"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kernelshreyak.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-11-13T17:36:25.000Z","updated_at":"2026-03-17T16:17:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kernelshreyak/robotics","commit_stats":null,"previous_names":["kernelshreyak/robotics"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kernelshreyak/robotics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernelshreyak%2Frobotics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernelshreyak%2Frobotics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernelshreyak%2Frobotics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernelshreyak%2Frobotics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kernelshreyak","download_url":"https://codeload.github.com/kernelshreyak/robotics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernelshreyak%2Frobotics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34139178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cad","circuit-design","circuits","freecad","industrial-robotics","iot","microcontrollers","robotics","simulation","webots"],"created_at":"2026-06-10T05:32:12.069Z","updated_at":"2026-06-10T05:32:16.729Z","avatar_url":"https://github.com/kernelshreyak.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Robotics Project Portfolio\n\nA grab bag of robotics experiments that span circuit-level simulations, full Webots and CoppeliaSim environments, OPC UA industrial IoT ingest scripts, and the CAD that ties them together. Each folder is self-contained so you can focus on the subsystem you care about.\n\n## Repository Layout\n\n| Path | Contents |\n| ---- | -------- |\n| `turret_simulation/` | Webots project for a manually driven turret (controllers, worlds, custom PROTO, shared assets). |\n| `shooter_mechanism/` | Webots arena for a dual-wheel shooter plus its controller sources and binaries. |\n| `conveyor_belt/` | Webots supervisor that keeps packages gliding across a frictional conveyor demo. |\n| `copelliasim/` | Ready-to-run `.ttt` scenes and Lua scripts for Pioneer P3-DX and Robotnik mobile robots. |\n| `industrial-iot/` | Python OPC UA ingestion examples and a `venv/` stub for Codesys/Kepware integrations. |\n| `sorting_machine/` | Webots WIP conveyor belt that will sort incoming boxes by color and size. |\n| `panda-reach-and-pick/` | MP4 demos for a Panda reach-and-pick reinforcement learning script. |\n| `ros2-experiments/` | Gazebo Sim and ROS 2 examples, currently including a 4-wheel basic vehicle with `cmd_vel` teleop. |\n| `circuit_simulations/` | SimulIDE `.sim1` schematic of a series voltage regulator. |\n| `part_design_cad/` | FreeCAD, OBJ/MTL, and Blender sources for the turret tripod mechanics. |\n\n## Prerequisites\n\n| Domain | Tools |\n| ------ | ----- |\n| Webots projects | Webots R2023b+, `gcc`/`make` (or MSVC on Windows). |\n| ROS 2 + Gazebo demos | ROS 2 Jazzy+ with Gazebo Harmonic / `gz sim` 8.x and `ros_gz_bridge`. |\n| CoppeliaSim scenes | CoppeliaSim Edu 4.6+ with Lua API enabled. |\n| Industrial IoT demos | Python 3.10+, `pip install opcua`, access to an OPC UA server (Codesys, Kepware Simulation Server, etc.). |\n| Circuit simulation | SimulIDE 1.x or another tool that opens `.sim1` XML circuits. |\n| CAD assets | FreeCAD 0.21+, Blender 3.x for editing, any viewer for OBJ/MTL export. |\n\n\u003e Tip: keep Python dependencies inside `industrial-iot/venv` (already ignored) so simulator SDK files don’t leak into commits.\n\n## Turret Simulation (Webots)\n\n- **Where**: `turret_simulation/controllers/turret_manual/`, `worlds/Turret Control Simulation.wbt`, `protos/Turret.proto`, and OBJ tripod meshes in `assets/`.\n- **Controls**: `A/D` yaw, `W/S` pitch with live angle readouts (`turret_manual.c`).\n- **Build \u0026 run**:\n  ```bash\n  cd turret_simulation/controllers/turret_manual\n  make\n  webots ../../worlds/\"Turret Control Simulation.wbt\"\n  ```\n  Select the `turret_manual` controller when prompted (or set it in the world file).\n\n## Shooter Mechanism (Webots)\n\n- **Controller**: `controllers/my_Shooter_controller/my_Shooter_controller.c` spins two wheels in opposite directions at ~50% of their rated speed, reading the max velocity at runtime.\n- **World**: `worlds/Shooter_arena.wbt` contains the shooter, targets, and arena walls.\n- **Build**:\n  ```bash\n  cd shooter_mechanism/controllers/my_Shooter_controller\n  make\n  webots ../../worlds/Shooter_arena.wbt\n  ```\n  Tweak `shoot_speed` before compiling if you swap motors.\n\n## Conveyor Belt (Webots)\n\n- **World**: `conveyor_belt/worlds/conveyor_belt_test.wbt` contains a belt, arena, and a handful of boxed packages (`DEF PACKAGE1`, `PACKAGE2`, etc.).\n- **Controller**: `controllers/conveyor_controller/conveyor_controller.c` runs as a supervisor robot; it enumerates up to ten packages, computes the delta between the desired belt speed (`BELT_SPEED`) and each box’s velocity, and applies a corrective force along +X so the boxes coast smoothly despite friction (`ContactProperties` uses 0.1 μ).\n- **Run it**:\n  ```bash\n  cd conveyor_belt/controllers/conveyor_controller\n  make\n  webots ../../worlds/conveyor_belt_test.wbt\n  ```\n  Keep the DEF names contiguous (`PACKAGE1`, `PACKAGE2`, …) so the controller auto-discovers them. Adjust `BELT_MIN_X/Z` bounds to match your belt geometry if you stretch it, otherwise the force cuts off early and parcels stall near the edges.\n\n## Sorting Machine (Webots, WIP)\n\n- **Status**: Conveyor belt is wired up; sorting mechanism is in progress to route boxes by color and size.\n- **World**: `sorting_machine/worlds/sorting_machine.wbt` contains the roller conveyor and a starter scene.\n- **Controller**: `sorting_machine/controllers/sorting_machine_conveyer/sorting_machine_conveyer.c` spins up to 25 roller motors (`roller_motor1..N`) at a fixed velocity for now.\n- **Known limitations / next steps**:\n  - Add color/size detection (camera or distance sensors + classification).\n  - Implement diverter or gate actuators to route boxes into bins.\n  - Spawn varied box sizes/colors and add per-box metadata for sorting logic.\n  - Tune roller speeds, friction, and timing so boxes align before sorting.\n- **Run it**:\n  ```bash\n  cd sorting_machine/controllers/sorting_machine_conveyer\n  make\n  webots ../../worlds/sorting_machine.wbt\n  ```\n\n## Panda Reach-and-Pick Demos\n\n`panda-reach-and-pick/` contains MP4 clips of a Panda arm reach-and-pick reinforcement learning demo based on:\n\n```text\nhttps://github.com/kernelshreyak/ai-ml-learning/blob/master/reinforcement-learning/panda_reach_cube.py\n```\n\n**Still frames (2s mark)**\n\n| Clip | Frame |\n| ---- | ----- |\n| `panda-pick-episode-0.mp4` | ![Panda pick episode 0 at 2s](panda-reach-and-pick/panda-pick-episode-0-2s.png) |\n| `panda-pick-episode-0 (1).mp4` | ![Panda pick episode 0 alt at 2s](panda-reach-and-pick/panda-pick-episode-0-1-2s.png) |\n| `panda-reach-pick-episode-0.mp4` | ![Panda reach-pick episode 0 at 2s](panda-reach-and-pick/panda-reach-pick-episode-0-2s.png) |\n| `panda-reach-pick-episode-0 (1).mp4` | ![Panda reach-pick episode 0 alt at 2s](panda-reach-and-pick/panda-reach-pick-episode-0-1-2s.png) |\n\n## ROS 2 Experiments\n\nLocated in `ros2-experiments/`:\n\n- `basic-vehicle/models/basic_vehicle/model.sdf`: 4-wheel skid-steer vehicle for Gazebo Sim with driven wheel joints and a `gz::sim::systems::DiffDrive` plugin listening on `/cmd_vel`.\n- `basic-vehicle/worlds/basic_vehicle_world.sdf`: flat plane world that spawns the vehicle at the origin.\n- `basic-vehicle/drive_vehicle.py`: lightweight ROS 2 keyboard teleop that publishes `geometry_msgs/msg/Twist`.\n\n**Run**\n\n```bash\nexport GZ_SIM_RESOURCE_PATH=$PWD/ros2-experiments/basic-vehicle/models:$GZ_SIM_RESOURCE_PATH\ngz sim ros2-experiments/basic-vehicle/worlds/basic_vehicle_world.sdf\n```\n\nIn a second terminal:\n\n```bash\nsource /opt/ros/$ROS_DISTRO/setup.bash\nros2 run ros_gz_bridge parameter_bridge /cmd_vel@geometry_msgs/msg/Twist@gz.msgs.Twist\n```\n\nIn a third terminal:\n\n```bash\nsource /opt/ros/$ROS_DISTRO/setup.bash\npython3 ros2-experiments/basic-vehicle/drive_vehicle.py\n```\n\nUse `w/s` for forward and reverse, `a/d` to steer, `x` or space to stop, and `q` to quit the teleop script.\n\n## CoppeliaSim Scenes\n\n| File | Purpose |\n| ---- | ------- |\n| `Pioneer.ttt` + `pioneer_script.lua` | Pioneer P3-DX demo that drives forward indefinitely (`vel = 2`). |\n| `robotnik_motion.ttt` + `robotnik_movement.lua` | Robotnik Summit XL routine with scripted forward/backward phases (`T1 = 26`, `T2 = 30`). |\n| `conveyer_belt.ttt` | Conveyor layout (ready for scripting). |\n\n**Usage**\n\n1. Launch CoppeliaSim → `File \u003e Open scene...` → select a `.ttt`.\n2. Ensure the paired Lua script is attached as a child script.\n3. Press *Play*; edit the Lua files for more advanced logic (sensor feedback, PID, etc.).\n\n## Industrial IoT OPC UA Demos\n\nLocated in `industrial-iot/`:\n\n- `ingest.py`: Connects to a Codesys PLC at `opc.tcp://192.168.29.10:4840`, reads button state plus set/actual conveyor speeds, and logs them every 0.5 s.\n- `opcua_ingest.py`: Lightweight poller for Kepware/KIT Simulation Server (`SERVER_URL = \"opc.tcp://shreyak-laptop:53530/OPCUA/SimulationServer\"`, `NODE_ID = \"ns=3;i=1003\"`).\n\n**Setup**\n\n```bash\ncd industrial-iot\npython -m venv venv\nsource venv/bin/activate\npip install opcua\npython ingest.py\n```\n\nSwap out the endpoint URL and node IDs for your PLC, and replace the `print()` calls with MQTT publishes, database writes, or cloud ingestion SDKs as needed.\n\n## CAD: Turret Tripod\n\n`part_design_cad/` contains the mechanical source of the turret base:\n\n- Edit solids in `turret_tripod.FCStd` (FreeCAD) and meshes in `turret_tripod.blend`.\n- Export updated OBJ/MTL pairs when you need to refresh the Webots assets (`turret_simulation/assets/`).\n- Backup files (`*.FCBak`, `.blend1`) are kept alongside the masters for quick rollback.\n\n## Circuit Simulation\n\n`circuit_simulations/series_voltage_regulator.sim1` is an XML-based SimulIDE project for a MOSFET series regulator with oscilloscope probes, push-button, and measurement instrumentation.\n\n1. Launch SimulIDE (or another `.sim1`-compatible simulator).\n2. Open the file and run the transient analysis to inspect the scope traces.\n3. Edit component values in the GUI or directly within the XML for version-controlled tweaks.\n\n## Development Notes\n\n- Keep generated artifacts (`build/`, controller binaries, `venv/`) out of commits or list them in `.gitignore`.\n- Re-export shared meshes from CAD whenever you change geometry so CoppeliaSim and Webots stay aligned.\n- Document new experiments in this README so others can discover and reuse them quickly.\n\n## License\n\nNo explicit license file exists yet. Add one (e.g., MIT, Apache-2.0) if you plan to publish or distribute the assets.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkernelshreyak%2Frobotics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkernelshreyak%2Frobotics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkernelshreyak%2Frobotics/lists"}