real-robot


Namereal-robot JSON
Version 0.1.0rc2 PyPI version JSON
download
home_page
SummaryReal Robot
upload_time2024-02-18 20:40:38
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2023 Kolin Guo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords robotics sensor visualization control
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RealRobot
Real robot interface to connect with ManiSkill2

Runs camera capturing and visualization as separate processes to make it closer to using ROS

:exclamation: This repo is still under heavy development, so API might be changed without notice

## Installation

```bash
python3 -m pip install -U real_robot
```

---

Calibrated camera poses are stored in [real_robot/assets/hec_camera_poses/](real_robot/assets/hec_camera_poses) and
loaded in [real_robot/sensors/camera.py](real_robot/sensors/camera.py).

## Helpful Tools

* Capture Color/Depth/IR images from RS camera, do
  ```bash
  python3 -m real_robot.tools.rs_capture
  ```
* Get detailed device information of connected RealSense device
  (*e.g.*, supported stream configs, sensor intrinsics, extrinsics between sensors), do
  ```bash
  python3 -m real_robot.tools.enumerate_rs_devices > info.log
  ```
* Convert recorded ROS bag file and save rgb & depth images into .npz, do
  ```bash
  python3 -m real_robot.tools.convert_rosbag_to_frames <bag_path>
  ```

## Notes

To fix an unindexed rosbag recorded from `RSDevice`, do
```bash
apt install -y python3-rosbag
rosbag reindex <bag_path>
```

## Known Issue
- [ ] When controlling xArm7 with `motion_mode="cartesian_online"` and `wait=True`,
  sometimes the robot will be stuck indefinitely in `wait_move()` due to `get_state()`
  returns wrong state (i.e., returns `state=1` thinking it's still in motion).
  Simple solution can be just to control briefly via UFACTORY Studio to get it unstuck.

## Changelog

<details>
<summary>0.1.0</summary>
<p>

### New features
* Added `SharedObject` to create/mount objects stored in `SharedMemory`
* Enabled `RSDevice` to run as a separate process (now `Camera` will create
  `RSDevice` as a separate process)
* Enabled `RSDevice` to record camera streams as a rosbag file
* Enabled `XArm7` to run as a separate process (for streaming robot states)
* Enabled `CV2Visualizer` and `O3DGUIVisualizer` to run as separate processes (for visualization)
* Added a default `FileHandler` to all Logger created through `real_robot.utils.logger.get_logger`
* Allow enabling selected camera streams from `RSDevice` and `sensors.camera.Camera`
* Added `sensors.simsense_depth.SimsenseDepth` class to generate depth image from stereo IR images

### API changes
* `real_robot.agents.xarm`
  * Change `XArm7` parameters for clarity (`safety_boundary` => `safety_boundary_mm`, `boundary_clip_eps` => `boundary_clip_mm`)
  * Add `get_gripper_position()` to get gripper opening width in mm or m
  * Add `gripper_speed` parameter to `set_action()` to control gripper speed
* `real_robot.utils.visualization.visualizer`
  * Rename `Visualizer` method `show_observation()` => `show_obs()`
* `real_robot.sensors.camera`
  * `CameraConfig` now accepts a `config` parameter
  * Rename `CameraConfig` parameter `parent_pose_fn` => `parent_pose_so_name`
* `real_robot.utils.realsense`
  * `RSDevice` now accepts `device_sn` instead of an `rs.device`
  * `RSDevice` now accepts `config` as parameter (`width`, `height`, `fps`) instead of `rs.config`

### Other changes
* Switch from `gym` to `gymnasium`
* Rename all `control_mode` by removing `pd_` prefix for clarity. No PD controller is used.
* `real_robot.agents.xarm`
  * `XArm7` will not clear *"Safety Boundary Limit"* error automatically in `set_action()`
  * For `motion_mode == "position"`, switch from using `set_tool_position()` to `set_position()`
  * Enable gripper and set to maximum speed in `reset()`
* Remove all Loggers created as global variables (they will be created
  at import, which might not be saved under `REAL_ROBOT_LOG_DIR`)
* Bugfix in xArm-Python-SDK: enable `wait=True` for modes other than position mode

</p>
</details>

<details>
<summary>0.0.2</summary>
<p>

* Added motion_mode to XArm7 agent
* Added several control_mode: `pd_ee_pos`, `pd_ee_pose_axangle`,
`pd_ee_delta_pose_axangle`, `pd_ee_pose_quat`, `pd_ee_delta_pose_quat`

</p>
</details>

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "real-robot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "robotics,sensor,visualization,control",
    "author": "",
    "author_email": "Kolin Guo <ruguo@ucsd.edu>",
    "download_url": "https://files.pythonhosted.org/packages/1a/3b/fa4e369077623d8e5acce6bee9be9ab9f00de2d65787ee4e60e7d4727225/real_robot-0.1.0rc2.tar.gz",
    "platform": null,
    "description": "# RealRobot\nReal robot interface to connect with ManiSkill2\n\nRuns camera capturing and visualization as separate processes to make it closer to using ROS\n\n:exclamation: This repo is still under heavy development, so API might be changed without notice\n\n## Installation\n\n```bash\npython3 -m pip install -U real_robot\n```\n\n---\n\nCalibrated camera poses are stored in [real_robot/assets/hec_camera_poses/](real_robot/assets/hec_camera_poses) and\nloaded in [real_robot/sensors/camera.py](real_robot/sensors/camera.py).\n\n## Helpful Tools\n\n* Capture Color/Depth/IR images from RS camera, do\n  ```bash\n  python3 -m real_robot.tools.rs_capture\n  ```\n* Get detailed device information of connected RealSense device\n  (*e.g.*, supported stream configs, sensor intrinsics, extrinsics between sensors), do\n  ```bash\n  python3 -m real_robot.tools.enumerate_rs_devices > info.log\n  ```\n* Convert recorded ROS bag file and save rgb & depth images into .npz, do\n  ```bash\n  python3 -m real_robot.tools.convert_rosbag_to_frames <bag_path>\n  ```\n\n## Notes\n\nTo fix an unindexed rosbag recorded from `RSDevice`, do\n```bash\napt install -y python3-rosbag\nrosbag reindex <bag_path>\n```\n\n## Known Issue\n- [ ] When controlling xArm7 with `motion_mode=\"cartesian_online\"` and `wait=True`,\n  sometimes the robot will be stuck indefinitely in `wait_move()` due to `get_state()`\n  returns wrong state (i.e., returns `state=1` thinking it's still in motion).\n  Simple solution can be just to control briefly via UFACTORY Studio to get it unstuck.\n\n## Changelog\n\n<details>\n<summary>0.1.0</summary>\n<p>\n\n### New features\n* Added `SharedObject` to create/mount objects stored in `SharedMemory`\n* Enabled `RSDevice` to run as a separate process (now `Camera` will create\n  `RSDevice` as a separate process)\n* Enabled `RSDevice` to record camera streams as a rosbag file\n* Enabled `XArm7` to run as a separate process (for streaming robot states)\n* Enabled `CV2Visualizer` and `O3DGUIVisualizer` to run as separate processes (for visualization)\n* Added a default `FileHandler` to all Logger created through `real_robot.utils.logger.get_logger`\n* Allow enabling selected camera streams from `RSDevice` and `sensors.camera.Camera`\n* Added `sensors.simsense_depth.SimsenseDepth` class to generate depth image from stereo IR images\n\n### API changes\n* `real_robot.agents.xarm`\n  * Change `XArm7` parameters for clarity (`safety_boundary` => `safety_boundary_mm`, `boundary_clip_eps` => `boundary_clip_mm`)\n  * Add `get_gripper_position()` to get gripper opening width in mm or m\n  * Add `gripper_speed` parameter to `set_action()` to control gripper speed\n* `real_robot.utils.visualization.visualizer`\n  * Rename `Visualizer` method `show_observation()` => `show_obs()`\n* `real_robot.sensors.camera`\n  * `CameraConfig` now accepts a `config` parameter\n  * Rename `CameraConfig` parameter `parent_pose_fn` => `parent_pose_so_name`\n* `real_robot.utils.realsense`\n  * `RSDevice` now accepts `device_sn` instead of an `rs.device`\n  * `RSDevice` now accepts `config` as parameter (`width`, `height`, `fps`) instead of `rs.config`\n\n### Other changes\n* Switch from `gym` to `gymnasium`\n* Rename all `control_mode` by removing `pd_` prefix for clarity. No PD controller is used.\n* `real_robot.agents.xarm`\n  * `XArm7` will not clear *\"Safety Boundary Limit\"* error automatically in `set_action()`\n  * For `motion_mode == \"position\"`, switch from using `set_tool_position()` to `set_position()`\n  * Enable gripper and set to maximum speed in `reset()`\n* Remove all Loggers created as global variables (they will be created\n  at import, which might not be saved under `REAL_ROBOT_LOG_DIR`)\n* Bugfix in xArm-Python-SDK: enable `wait=True` for modes other than position mode\n\n</p>\n</details>\n\n<details>\n<summary>0.0.2</summary>\n<p>\n\n* Added motion_mode to XArm7 agent\n* Added several control_mode: `pd_ee_pos`, `pd_ee_pose_axangle`,\n`pd_ee_delta_pose_axangle`, `pd_ee_pose_quat`, `pd_ee_delta_pose_quat`\n\n</p>\n</details>\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Kolin Guo  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Real Robot",
    "version": "0.1.0rc2",
    "project_urls": {
        "Repository": "https://github.com/KolinGuo/RealRobot"
    },
    "split_keywords": [
        "robotics",
        "sensor",
        "visualization",
        "control"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "adfc9d405256d56aa318b9fda6c2c7f4ce7009d8b834614e369600734ec62adb",
                "md5": "88cf6d0e976480078ed4ebe652374755",
                "sha256": "dd94d16df29d0ce014fb4afa28d2a75702e7f3802da785923dcb37c6f769ec3e"
            },
            "downloads": -1,
            "filename": "real_robot-0.1.0rc2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "88cf6d0e976480078ed4ebe652374755",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19756819,
            "upload_time": "2024-02-18T20:40:35",
            "upload_time_iso_8601": "2024-02-18T20:40:35.400897Z",
            "url": "https://files.pythonhosted.org/packages/ad/fc/9d405256d56aa318b9fda6c2c7f4ce7009d8b834614e369600734ec62adb/real_robot-0.1.0rc2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a3bfa4e369077623d8e5acce6bee9be9ab9f00de2d65787ee4e60e7d4727225",
                "md5": "1b51c3f0e91bf527aa24a22760ca6df4",
                "sha256": "9c8876fae1fc4fd9e4be0e0a6532d6c919bb96b6e2f5c01a31661fb83aaac3f4"
            },
            "downloads": -1,
            "filename": "real_robot-0.1.0rc2.tar.gz",
            "has_sig": false,
            "md5_digest": "1b51c3f0e91bf527aa24a22760ca6df4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 19714258,
            "upload_time": "2024-02-18T20:40:38",
            "upload_time_iso_8601": "2024-02-18T20:40:38.192391Z",
            "url": "https://files.pythonhosted.org/packages/1a/3b/fa4e369077623d8e5acce6bee9be9ab9f00de2d65787ee4e60e7d4727225/real_robot-0.1.0rc2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-18 20:40:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "KolinGuo",
    "github_project": "RealRobot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "real-robot"
}
        
Elapsed time: 0.16479s