{"id":21103087,"url":"https://github.com/robotnikautomation/daly_bms","last_synced_at":"2025-05-16T18:34:59.546Z","repository":{"id":43320682,"uuid":"368130590","full_name":"RobotnikAutomation/daly_bms","owner":"RobotnikAutomation","description":"ROS package for Daly Battery Monitor System (BMS)","archived":false,"fork":false,"pushed_at":"2024-09-16T12:55:53.000Z","size":107,"stargazers_count":9,"open_issues_count":5,"forks_count":9,"subscribers_count":6,"default_branch":"ros2-devel","last_synced_at":"2024-09-16T14:59:50.926Z","etag":null,"topics":["bms","containers","ros","ros2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobotnikAutomation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2021-05-17T09:34:41.000Z","updated_at":"2024-09-04T10:34:39.000Z","dependencies_parsed_at":"2024-09-16T14:58:39.842Z","dependency_job_id":"bd31206f-6115-44dd-b612-ffcf5bfba708","html_url":"https://github.com/RobotnikAutomation/daly_bms","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotnikAutomation%2Fdaly_bms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotnikAutomation%2Fdaly_bms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotnikAutomation%2Fdaly_bms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotnikAutomation%2Fdaly_bms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobotnikAutomation","download_url":"https://codeload.github.com/RobotnikAutomation/daly_bms/tar.gz/refs/heads/ros2-devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225444585,"owners_count":17475354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bms","containers","ros","ros2"],"created_at":"2024-11-19T23:57:39.238Z","updated_at":"2024-11-19T23:57:39.721Z","avatar_url":"https://github.com/RobotnikAutomation.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Daly Battery Driver\n\nROS package that uses [python-daly-bms driver](https://github.com/dreadnought/python-daly-bms) data to read information from Daly BMS devices and publishes it using robotnik_msgs/BatteryStatus message type.\n\n## Installation\n\n```bash\ncommand -v vcs \u003e/dev/null 2\u003e\u00261 || (sudo apt update \u0026\u0026 sudo apt install -y python3-vcstool)\ncommand -v pip3 \u003e/dev/null 2\u003e\u00261 || (sudo apt update \u0026\u0026 sudo apt install -y python3-pip)\nmkdir -p robot_ws/src\ncd robot_ws/src\ngit clone -b ros2-devel git@github.com:RobotnikAutomation/daly_bms.git\nvcs import \\\n    --input daly_bms/common.repos.yaml \\\n    --shallow \\\n    .\npip3 install -r daly_bms/requirements.txt\ncd ..\nrosdep install\ncd src/daly_bms\ncolcon build\n```\n\n## Run\n```bash\nsource install/setup.bash\nros2 launch daly_bms daly_bms.launch.xml\n```\n### Launch File Arguments\n\nThe launch file accepts the following arguments:\n\n1. **port**\n   - Description: Specifies the serial port for the BMS connection.\n   - Default value: Set by the environment variable `ROBOT_BMS_PORT`, or `/dev/ttyUSB_BMS` if not set.\n   - Usage: `ros2 launch daly_bms daly_bms.launch.xml port:=/dev/ttyUSB0`\n\n2. **node_name**\n   - Description: Sets the name of the ROS2 node.\n   - Default value: Set by the environment variable `NODE_NAME`, or `battery_estimator` if not set.\n   - Usage: `ros2 launch daly_bms daly_bms.launch.xml node_name:=my_bms_node`\n\n3. **robot_id**\n   - Description: Defines the robot identifier, used as the namespace for the node.\n   - Default value: Set by the environment variable `ROBOT_ID`, or `robot` if not set.\n   - Usage: `ros2 launch daly_bms daly_bms.launch.xml robot_id:=my_robot`\n\n4. **log_level**\n   - Description: Sets the logging level for the node.\n   - Default value: Set by the environment variable `LOG_LEVEL`, or `INFO` if not set.\n   - Usage: `ros2 launch daly_bms daly_bms.launch.xml log_level:=DEBUG`\n\n\n### Ros run parameters\n\n- **serial_port** (String, `/dev/ttyUSB_BMS`): Serial port of the device\n\n## Containers\n\n### Setup the containers\nThe container setup is controlled by the [`setup-container.yaml`](./setup-container.yaml) file. This file contains essential variables for creating the required Docker image files. Review and edit this file as needed before proceeding with the setup.\n\n```yaml\n---\nimages:\n  version: devel\n  sites:\n    local: docker-hub\n    # local: robotnik\n\nros:\n  general:\n    distro: humble\n    domain_id: 50\n    robot_id: robot\n    log_level: INFO\n  bms:\n    port: /dev/ttyUSB_BMS\n```\n\n#### Key Configuration Parameters\n\n- `images.version`: Specifies the version tag for the Docker image.\n- `images.sites`: Defines the Docker registry locations for local environment. (Options are `docker-hub` or `robotnik`)\n- `ros.general`: Contains ROS 2 specific configurations, including the distribution and robot settings.\n- `ros.bms`: Specifies hardware-related settings, such as the BMS port.\n\n#### Creating Container Files\n\nTo create the container files use the following command\n```bash\nsetup-container/scripts/setup.sh\n```\nThis script will process the `setup-container.yaml` file and create all required Docker-related files in the appropriate directories.\n\n### Create Container\nTo build the container, navigate to the builder directory and use Docker Compose. This step compiles the necessary images based on the Dockerfile provided in the directory.\n```bash\ncd container/builder\ndocker compose build\n```\n### Run in container\nTo run the Daly BMS application inside a Docker container, execute the following commands. This will start the container in detached mode, allowing the application to run in the background.\n```bash\ncd container/run\ndocker compose up -d\n```\n### Debug in container\nFor debugging purposes, you can access the container's shell. This allows you to interact with the application directly, inspect logs, and troubleshoot issues. the source is mounted on your container and you can edit with your favourite ide.\n```bash\ncd container/debug\ndocker compose up -d\ndocker compose exec bms bash\n```\n\n### Obtaining DEB Files\nTo generate Debian packages:\n```bash\ncd container/debs\ndocker compose up --build\n```\n\n### Pass unitary tests\nTo run the unitary tests:\n```bash\ncd container/test\ndocker compose build\n```\n\n## Additional information\n\nThis package includes an udev rule to find the USB device using its model and vendor identifiers. This is useful to bind the device to a specific port, independently of the actual physical port where the device is plugged. To add this udev rule to your system, just copy it into your /etc/udev/rules.d directory.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotnikautomation%2Fdaly_bms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobotnikautomation%2Fdaly_bms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotnikautomation%2Fdaly_bms/lists"}