# robotsim **Repository Path**: ArkTSCentralRepository/robotsim ## Basic Information - **Project Name**: robotsim - **Description**: robotsim 是一个机器人仿真库,提供二维环境模拟,支持光源、障碍物、传感器和执行器(如轮子)噪声等功能,用于机器人编程和策略测试。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-21 - **Last Updated**: 2024-11-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # robotsim > Robot simulation, WIP 基于[robotsim](https://www.npmjs.com/package/robotsim)原库0.0.1-alfa版本进行适配,所有功能代码已经转换为`ArkTS`文件 ## Install ```shell ohpm install robotsim ``` ## Objetives ### Environment - Have a two-dimension environment - Have light sources in environment - Have obstables in environment (initially, simple rectangles) ### Robot - One or more robots - Distance sensors, with orientation - Light sensors, with orientation - Movement actions (ie: two wheels, or only advance distance and turn) - Sensors with noise - Action actuators (ie: wheels) with noise (ie: wheel slip) ### Strategies - Hardwired programming - Evolutionary programming ### Interface - Environment canvas/SVG display in browser - Consumed as a library, from browser or command line ## Usage ```typescript import { createRobot, RobotOptions } from 'robotsim'; const options = new RobotOptions(0); const robot = createRobot(options); console.log(robot.position()); ``` ## References - [An Introductory Robot Programming Tutorial](https://www.toptal.com/robotics/programming-a-robot-an-introductory-tutorial) - [How to check if two given line segments intersect?](https://www.geeksforgeeks.org/check-if-two-given-line-segments-intersect/) - [How to check if a given point lies inside or outside a polygon?](https://www.geeksforgeeks.org/how-to-check-if-a-given-point-lies-inside-a-polygon/) - [Luminance](https://en.wikipedia.org/wiki/Luminance) ## Samples TBD ## Versions TBD ## Contribution Feel free to [file issues](https://github.com/ajlopez/robotsim) and submit [pull requests](https://github.com/ajlopez/robotsim/pulls) � contributions are welcome. If you submit a pull request, please be sure to add or update corresponding test cases, and ensure that `npm test` continues to pass.