Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Feat/mint #505

Merged
merged 136 commits into from
Aug 25, 2023
Merged

[WIP] Feat/mint #505

merged 136 commits into from
Aug 25, 2023

Conversation

moon-strider
Copy link
Contributor

@moon-strider moon-strider commented Jun 29, 2023

Overview

The feat/mint branch introduces a new dream distribution dream_mint that is based on dream_robot distribution from command_selector_distributions branch.

Note: even though feat/mint is based on command_selector_distributions, most of the services, skills and files from dream_robot distributions were removed from feat/mint, because not removing would make it very confusing to review changes made exactly in feat/mint, and not just copied from command_selector_distributions. Some files from command_selector_distributions were kept as they are essential for dream_mint to work.

Services, annotators and skills added:

  • annotators/mint_status
  • services/ros_flask_server
  • services/mint_sender
  • skills/dff_mint_skill

Implementation details

Dream-side details

dream_mint is a dream distribution that can be used in tandem with potentially and valid dream agent to recieve user inputs and then process them in a special ROS-compliant way that makes interactions with real-world robots possible while not imparing its ability to interact with virtual worlds and other non-ROS environments.

Currently dream_mint uses Telegram as the agent to recieve user text inputs.

Note: Telegram also can be used to recieve user inputs as images or/and audio files if the needed endresult so requires.

Introducing mint-connectors

There is an external entity that has to be running at the client-side: a mint-connector.

Check current version of mint-connector at https://github.com/deeppavlov/minecraft-interface

A mint-connector is a lightweight client-side solution used to easily connect remote client devices to dream. It handles all the connection initialization, recieving requests from and sending requests to dream in a predefined format that is used inside dream.

An integral part of the mint-connector is a plug-in that has concrete implementations of commands used in your game/robot/solution. In the aforementioned conector, you can find a plug-in for Minecraft at game_minecraft.py or a simple blank plug-in for testing purposes at game_blank.py. For more details on connector — go to README.md in current connector's repository.

Launching dream_mint

The dream distribution introduced in feat/mint can be found at assistant_dists/dream_mint containing all the necessary dream configurations to launch said dream distribution using a single command:
docker-compose -f docker-compose.yml -f assistant_dists/dream_mint/docker-compose.override.yml -f assistant_dists/dream_mint/dev.yml -f assistant_dists/dream_mint/proxy.yml up --build --force-recreate; docker stop $(docker ps -aq)

Warning! If you don't want all the running docker containers to be stopped when you exit the docker-compose process, use the following command: docker-compose -f docker-compose.yml -f assistant_dists/dream_mint/docker-compose.override.yml -f assistant_dists/dream_mint/dev.yml -f assistant_dists/dream_mint/proxy.yml up --build --force-recreate.

common/utils.py Outdated
@@ -103,6 +103,8 @@
"what_is_your_name",
"where_are_you_from",
"who_made_you",
"move_forward",
"move_backward",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are not necessy here because you do not use them for dff_intent_responder_skill

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to remove earlier, removed

@@ -0,0 +1,3 @@
SERVICE_PORT: 6000
SERVICE_NAME: ros_flask_server
CUDA_VISIBLE_DEVICES: '0'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed


VALID_COMMANDS = ["test_command"]
COMMAND_QUEUE = []
EXECUTING_COMMAND = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does not have endpoint ping here. is it correct? ping is required for is_container_running function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_container_running worked correctly (or it seemed like it) without it. endpoint added

@@ -126,9 +127,8 @@ async def send(self, payload: Dict, callback: Callable):
skills_for_uttr.append("dummy_skill")
# process intent with corresponding IntentResponder
skills_for_uttr.append("dff_intent_responder_skill")
elif command_detected:
if embodied_cmd_detected or command_detected:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elif will work if you delete your intents from high_priority_intents where you added (i wrote above that it is not neccessary)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elif readded

@@ -59,9 +59,9 @@ def handler(requested_data, random_seed=None):


while True:
result = containers.is_container_running(ROS_FSM_SERVER)
result = containers.is_container_running(ROS_FLASK_SERVER)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you do not have ping endpoint as I understood.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

может он втсроенный какой-то и я не поняла - напиши плиз про это

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Выше написал. Эта штука точно работала, когда я всё проверял и читал логи. Но на всякий случай добавил пинг

ROS_FLASK_SERVER: http://ros-flask-server:6000
FAKE: "False"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it a string? to make it bool, you may use FAKE: false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -9,7 +9,8 @@ compose:
SERVICE_PORT: 8148
SERVICE_NAME: dff_command_selector_skill
LANGUAGE: EN
ROS_FSM_SERVER: http://robot-fake-server:8038
ROS_FLASK_SERVER: http://ros-flask-server:6000
FAKE: "False"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@dilyararimovna dilyararimovna merged commit 4c373e5 into dev Aug 25, 2023
2 checks passed
@dilyararimovna dilyararimovna deleted the feat/mint branch August 25, 2023 10:44
oserikov pushed a commit that referenced this pull request Nov 21, 2024
* feat: command selector distributions

* fix: black style

* fix: tests

* feat: commands phrases

* fix: naming

* fix: use correct lang

* fix: dream robot

* fix: get entities

* feat: get updates from original distrs

* fix: dff-command-selector-ru-skill

* fix: selector

* fix: formatter

* fix: formatter

* fix: valid commands

* feat: new params and pipeline fixes

* feat: ru components ymls

* feat: synch with working petilia version

* fix: min lims

* fix: simplier check

* fix: black style

* fix: from review comments

* fix: json

* fix: path to data

* fix: tests for commands

* fix: detecting intents

* fix: tests

* fix: tests for intent catcher

* fix: port

* fix: ru tests

* fix: intent catcher tests

* fix: tests separate

* fix: commands test

* fix: synch response

* fix: float conf

* fix: codestyle

* fix: flake codestyle

* mint connector added, pipeline_conf modified accordingly

* formatter added, socket connector done, requirements added

* placeholder mint skill added, tbd: logic, commands, annotator, service

* mint skill updated (WIP)

* more config files updated to use mint and to not use command-selector and command-sender

* dff_mint_skill and mint_sender now work akin to robot skill and services

* mint_service (now in mint_sender) removed

* proxy typo fixed, command-intent-catcher removed from proxy

* mint_status server added, ros_flask_server svc added, configs updated

* minor style fix, naming fixed, warning added

* ROS_FSM_SERVER -> ROS_FLASK_SERVER

* configs changed, code style fixed

* small config fix

* mint services added to WAIT_HOSTS

* dev.yml fiks

* - -> _

* ros-flask-server dockerfile fixed

* ros-flask-server dockerfile sudo access from user fixed

* config files updated, FSM_SERVER -> ROS_FLASK_SERVER

* many config and Dockerfile fixes, ros disabled for debugging purposes

* first working version of mint skills (no ros and client yet)

* tildas removed

* ROS fixed!

* changed ros-flask port from 8339 to 5000 (as it is public)

* ports added to ros-server compose

* removing possible cache from ros container

* removed excessive ports in docker-compose, intent_responder force -> mint force

* more files fixed intent_responder -> mint_skill

* rule-based selector fixed for mint skill

* removed intent responder robot skill, removed hardcoded command list

* readded dream_robot from command_selector_distributions, all mint files moved to dream_mint distro, configs updated

* pr fix 1

* pr fix 2

* pr fix 3

* pr fix 4

* pr fix 5 (spelling preprocessing removed from dream_mint, ros_flask_server Dockerfile modified)

* pr fix 6 (convers-evaluator-annotator -> sentence ranker + rank based selector)

* pr fix 7 - misc fixes: configs, svc list, tests changed

* codestyle pr fix

* codestyle pr fix 2

* codestyle pr fix 3

* component cards and service_configs added to mint services

* component cards fix 2

* component cards fix 3

* component cards fix 4

* component cards fix 5 (service_configs fix)

* component cards fix 6

* merge conflicts fixed 2

* massive pr fix

* another big pr fix

* intent responder readded

* formatting fixed

* command_intents and mint_intents fixed

* another pr fix

* mint -> embodied all names changed

* convers-evaluation-selector removed (ranking-based is already set-up)

* convers-evaluation-selector remnants removed

* removed dff_embodied_skill and embodied_sender

* removed dff_embodied_skill and embodied_sender remnants, robot skills restored

* tests disabled for command_selector and intent_responder

* added move commands to high priority intents

* tests restored for intent catcher and command_selector

* robot_notifications restored

* skill selector slightly modified

* intent responder added to configs

* fixed command_selector tests

* more command_selector tests fixed

* command_selector Dockerfile fixed, rule-based-selector fixed

* service cards updated

* embodied_status removed

* embodied_status remnants removed

* FSM server -> FLASK server, 5000 port -> 6000 port

* testing and actual ros-flask server usage in command_selector skill modified

* faulty test logic fixed

* test logic changed again

* final touch to make command_selector work as intended

* style fixed

* tests for dff_command_selector_skill completely redesigned

* minor env variable fix

* intent json fixed

* env fixed in Dockerfile for command selector skill

* redundant parameter in command selector removed

* style fixed

* black style fixed

* pr misc fixes

* rule_based_selector slightly fixed

* json error fixed

---------

Co-authored-by: dilyararimovna <dilyara.rimovna@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants