Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1404774
Removed the deprecated rest node
Dozgulbas Aug 14, 2024
bfa9ab9
Updated rest node
Dozgulbas Aug 14, 2024
3385d84
Dockstring update
Dozgulbas Aug 14, 2024
e75c545
Editing docstringg
Dozgulbas Aug 14, 2024
5427b30
Update run command
Dozgulbas Aug 14, 2024
c93d834
Update args
Dozgulbas Aug 14, 2024
dedfa56
Adding issue templates
Dozgulbas Aug 15, 2024
fd3ec7d
Removed
Dozgulbas Aug 15, 2024
002b047
Update
Dozgulbas Aug 15, 2024
29fa703
Updates
Dozgulbas Aug 15, 2024
24e7444
Updated port
Dozgulbas Aug 15, 2024
56e9ba1
Updated port
Dozgulbas Aug 15, 2024
228cfeb
Updated port
Dozgulbas Aug 15, 2024
da63a32
Clean up
Dozgulbas Aug 15, 2024
70d1051
Clean up
Dozgulbas Aug 15, 2024
4fb385e
Bug fix
Dozgulbas Aug 15, 2024
8e4d450
Removed MIR Key argument
Dozgulbas Aug 15, 2024
c8d4bf8
Removed MIR Key argument
Dozgulbas Aug 15, 2024
ed5a9c9
Removed MIR Key argument
Dozgulbas Aug 15, 2024
ee8b241
Added Move and Dock actions
Dozgulbas Aug 15, 2024
df453d5
Merge branch 'main' of https://github.com/AD-SDL/mir_module into rest…
Dozgulbas Aug 15, 2024
4daaa46
Added abort mission
Dozgulbas Aug 15, 2024
9820af4
Merge branch 'main' of https://github.com/AD-SDL/mir_module into rest…
Dozgulbas Aug 19, 2024
b9ed13a
Precommit..
AileenCleary Aug 20, 2024
e505410
pre-commit..
AileenCleary Aug 20, 2024
a76cc08
Added wait functionality for experiments.
AileenCleary Aug 20, 2024
866cc22
Added wait action
Dozgulbas Aug 20, 2024
57cb47e
Converted seconds to datetime, accept seconds as arg now.
AileenCleary Aug 20, 2024
a5a09dd
Converted seconds to datetime, accept seconds as arg now.
AileenCleary Aug 20, 2024
76bd0a6
Added robot state checks
Dozgulbas Aug 21, 2024
4782ebb
Fixing import errors
Dozgulbas Aug 21, 2024
541699d
Fixing conflicts
Dozgulbas Aug 21, 2024
0538725
Removed key argument
Dozgulbas Aug 21, 2024
8c58097
Added map name argument
Dozgulbas Aug 21, 2024
2d46d1e
tests
Dozgulbas Aug 21, 2024
bf5417b
Clean up
Dozgulbas Aug 21, 2024
c5afe62
Small changes to driver/rest_node to match names
AileenCleary Aug 21, 2024
c6281c4
Note on rest node about state messages. TBD
AileenCleary Aug 21, 2024
505333c
Test
AileenCleary Aug 30, 2024
3869cd8
Testing 'wait until finished' action
AileenCleary Sep 5, 2024
bab8c67
Changed state handler. Added 'Executing' state for executing missions…
AileenCleary Sep 6, 2024
2f3dcdb
More specific state messages.
AileenCleary Sep 18, 2024
838424f
updated to madsci
tginsbu1 Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Code with explanation
2. How to run code
3. The error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
- OS: [e.g. Linux]
- Package versions implicated in the error (torch, mdlearn versions, etc)

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/other.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Other issue template
about: Any issue that does not fit the other templates
title: ''
labels: ''
assignees: ''

---

**Description**
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/question-issue-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Question issue template
about: Ask a question about how to use mdlearn
title: ''
labels: question
assignees: ''

---

**Describe the question**
76 changes: 0 additions & 76 deletions .github/workflows/docker-build.yml

This file was deleted.

10 changes: 6 additions & 4 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ name: Docker Build and Publish

on:
push:
branches: [ "main" ]
branches: [ "*" ]
# Publish semver tags as releases.
tags: [ '*' ]
schedule: # Run on Tuesday's at noon
- cron: '0 12 * * 2'

env:
# Use docker.io for Docker Hub if empty
Expand All @@ -20,6 +22,7 @@ env:

jobs:
build_and_publish:

runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -35,10 +38,9 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# Login against a Docker registry except on PR
# Login against a Docker registry
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -59,7 +61,7 @@ jobs:
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}

# Build and push Docker image with Buildx (don't push on PR)
# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
Expand Down
19 changes: 3 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# Python Configuration
PYPROJECT_TOML := pyproject.toml
PROJECT_VERSION := $(shell grep -oP '(?<=version = ")[^"]+' $(PYPROJECT_TOML) | head -n 1)

.DEFAULT_GOAL := init

.PHONY += init paths checks test hardware_test clean
.PHONY += init paths checks test clean

init: # Do the initial configuration of the project
@test -e .env || cp example.env .env
@sed -i 's/^PROJECT_VERSION=.*/PROJECT_VERSION=$(PROJECT_VERSION)/' .env
@sed -i 's/^PROJECT_PATH=.*/PROJECT_PATH=$(shell pwd | sed 's/\//\\\//g')/' .env

.env: init

Expand All @@ -22,13 +17,5 @@ checks: # Runs all the pre-commit checks

test: init .env paths # Runs all the tests
@docker compose -f wei.compose.yaml --env-file .env up --build -d
@docker compose -f wei.compose.yaml --env-file .env exec mir_module pytest -p no:cacheprovider -m "not hardware" mir_module
@docker compose -f wei.compose.yaml --env-file .env exec mir_module pytest -p no:cacheprovider mir_module
@docker compose -f wei.compose.yaml --env-file .env down

# hardware_test: init .env paths # Runs all the tests
# @docker compose -f wei.compose.yaml --env-file .env up --build -d
# @docker compose -f wei.compose.yaml --env-file .env exec mir_module pytest -p no:cacheprovider -m "hardware" mir_module
# @docker compose -f wei.compose.yaml --env-file .env down

clean:
@rm .env
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
# mir_module
# MiR Base 250 Module

## Overview

The 'mir_module' repository is a comprehensive package that includes a MiR driver and REST node compatible with Mobile Industrial Robots (MiR) MiR 250 Base robot. This module is designed to provide a comprehensive and intuitive approach to controlling and interacting with a MiR 250. The repository allows for both immediate, simplified control of the MiR along with higher-level development of complex missions and experiments.

## Features

### MiR 250 Driver Package

The MiR 250 driver package in this repository supports various methods to enable complete and comprehensive control of your MiR base robot and development of both simple and complex missions and environments. Key focuses and functions of the driver include:

1. **Debugging and Development**
- Methods such as *get_actions* and *get_action_type* provide detailed information on the types of actions available to the MiR and the necessary parameters for continued development.

2. **Mission Queue Configuration and Monitoring**
- Upon initialization of your MiR_Base robot, a new mission "session" is started. Functions related to mission queues will refer only to missions started during the session. The session can be reset after initialization as desired.

3. **High-Level, Multi-Action Mission Development**

4. **Simplified and Immediate MiR Control**

... WIP
5 changes: 2 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ services:
dockerfile: Dockerfile
tags:
- ${IMAGE}:latest
- ${IMAGE}:${PROJECT_VERSION}
- ${IMAGE}:dev
command: python -m mir_rest_node --port 3000 --alias ${MIR_ALIAS} --mir_url ${MIR_URL} --mir_key ${MIR_KEY}
command: python -m mir_rest_node --port 3043 --mir_host ${MIR_HOST} --map_name ${MAP_NAME}
env_file: .env
volumes:
- ./src:/home/app/mir_module/src
- ./tests:/home/app/mir_module/tests
ports:
- 3000:3000
- 3043:3043
9 changes: 3 additions & 6 deletions example.env
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Note: all paths are relative to the docker compose file
MIR_ALIAS="mir250_base_1"
MIR_URL="146.137.240.35"
MIR_KEY=10100
PROJECT_PATH=
PROJECT_VERSION=
MIR_HOST="mirbase2.cels.anl.gov"
MAP_NAME="RPL"
WEI_DATA_DIR=~/.wei
WORKCELL_FILENAME=test_workcell.yaml
WORKCELLS_DIR=${PROJECT_PATH}/tests/workcell_defs
WORKCELLS_DIR=./tests/workcell_defs
IMAGE=ghcr.io/ad-sdl/mir_module
REDIS_DIR=~/.wei/redis
46 changes: 46 additions & 0 deletions locations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"RPL": {
"camera_marker": {
"pos_x": 8.209,
"guid": "4ccacd0d-7f46-11ee-8521-0001297b4d50",
"orientation": 180.0,
"pos_y": 16.306,
"type_id": 9
},
"charger1": {
"pos_x": 10.119,
"guid": "f0908191-7f46-11ee-8521-0001297b4d50",
"orientation": 88.936,
"pos_y": 21.557,
"type_id": 20
},
"N9": {
"pos_x": 11.0,
"guid": "7224a20f-d65c-11ee-a833-0001297b4d50",
"orientation": 0.0,
"pos_y": 16.372,
"type_id": 11
},
"test_pos": {
"pos_x": 10.119,
"guid": "88c7d8ff-54d0-11ef-90e0-0001297b4d50",
"orientation": 88.936,
"pos_y": 19.0,
"type_id": 0
},
"test_move": {
"pos_x": 7.0,
"guid": "d99494c0-54d5-11ef-be3f-0001297b4d50",
"orientation": 180.0,
"pos_y": 20.2,
"type_id": 0
},
"another_move": {
"pos_x": 8.1,
"guid": "b34d6e54-5670-11ef-a572-0001297b4d50",
"orientation": 3.18,
"pos_y": 20.4,
"type_id": 0
}
}
}
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description = "Software for automatting a mir robot"
authors = [
{name = "Ryan D. Lewis", email="ryan.lewis@anl.gov"},
{name = "Rafael Vescovi", email="ravescovi@anl.gov"},
{name = "Doga Ozgulbas", email="dozgulbas@anl.gov"},
{name = "Abe Stroka", email="astroka@anl.gov"},
{name = "Kyle Hippe", email = "khippe@anl.gov"},
{name = "Tobias Ginsburg", email = "tginsburg@anl.gov"},
{name = "Aileen Cleary", email = "acleary@anl.gov"},
]
dependencies = [
"ad_sdl.wei>=0.5.3",
Expand Down Expand Up @@ -60,7 +65,7 @@ exclude = [
]

# Same as Black.
line-length = 88
line-length = 120
indent-width = 4

# Assume Python 3.8
Expand Down
46 changes: 46 additions & 0 deletions src/mir_driver/locations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"RPL": {
"camera_marker": {
"pos_x": 8.209,
"guid": "4ccacd0d-7f46-11ee-8521-0001297b4d50",
"orientation": 180.0,
"pos_y": 16.306,
"type_id": 9
},
"charger1": {
"pos_x": 10.119,
"guid": "f0908191-7f46-11ee-8521-0001297b4d50",
"orientation": 88.936,
"pos_y": 21.557,
"type_id": 20
},
"N9": {
"pos_x": 11.0,
"guid": "7224a20f-d65c-11ee-a833-0001297b4d50",
"orientation": 0.0,
"pos_y": 16.372,
"type_id": 11
},
"test_pos": {
"pos_x": 10.119,
"guid": "88c7d8ff-54d0-11ef-90e0-0001297b4d50",
"orientation": 88.936,
"pos_y": 19.0,
"type_id": 0
},
"test_move": {
"pos_x": 7.0,
"guid": "d99494c0-54d5-11ef-be3f-0001297b4d50",
"orientation": 180.0,
"pos_y": 20.2,
"type_id": 0
},
"another_move": {
"pos_x": 8.1,
"guid": "b34d6e54-5670-11ef-a572-0001297b4d50",
"orientation": 3.18,
"pos_y": 20.4,
"type_id": 0
}
}
}
Loading
Loading