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][Feature] Implement map action for dynamic kick #50

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

hiikariri
Copy link
Contributor

Jira Link:

Description

Change the workflow to start an action. When wide kick action is detected, the value of the joint is mapped between normal and wide kick based on the ball x position in the camera. There is also a change to load config and save config, because the structure of action folder is now:
action

  • dynamic_kick.json
  • actions
    • left_kick.json
    • init.json
    • walkready.json
    • ...
      Work is still in progress.

Type of Change

  • Bugfix
  • Enhancement
  • New feature
  • Breaking change (fix or feature that would cause the existing functionality to not work as expected)

How Has This Been Tested?

  • New unit tests added.
  • Manual tested.

Checklist:

  • Using Branch Name Convention
    • feature/JIRA-ID-SHORT-DESCRIPTION if has a JIRA ticket
    • enhancement/SHORT-DESCRIPTION if has/has no JIRA ticket and contain enhancement
    • hotfix/SHORT-DESCRIPTION if the change doesn't need to be tested (urgent)
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have made the documentation for the corresponding changes.

@hiikariri hiikariri changed the title [WIP ][Feature] Implement map action for dynamic kick [WIP][Feature] Implement map action for dynamic kick Jun 23, 2024
@hiikariri hiikariri marked this pull request as draft June 23, 2024 11:27
src/akushon/action/model/action.cpp Outdated Show resolved Hide resolved
std::string name = "";
std::string file_name = entry.path();
std::string extension_json = ".json";
for (int i = path.length(); i < file_name.length() - extension_json.length(); i++) {
for (int i = (path + action_dir).length(); i < file_name.length() - extension_json.length(); i++) {
Copy link
Member

Choose a reason for hiding this comment

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

Ditto:

Suggested change
for (int i = (path + action_dir).length(); i < file_name.length() - extension_json.length(); i++) {
for (int i = (path + action_dir).length(); i < file_name.length() - extension_json.length(); ++i) {

Comment on lines 108 to 109
for (auto &[key, val] : json.items()) {
if (key == "dynamic_kick") {
Copy link
Member

Choose a reason for hiding this comment

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

Should use nlohmann::json::find instead of for-looping the items.

src/akushon/action/node/action_manager.cpp Outdated Show resolved Hide resolved
src/akushon/action/node/action_manager.cpp Outdated Show resolved Hide resolved
src/akushon/action/node/action_node.cpp Outdated Show resolved Hide resolved
src/akushon/action/node/action_node.cpp Outdated Show resolved Hide resolved
src/akushon/config/utils/config.cpp Outdated Show resolved Hide resolved
src/akushon/action/model/action.cpp Outdated Show resolved Hide resolved
src/akushon/action/model/action.cpp Outdated Show resolved Hide resolved
src/akushon/action/model/action.cpp Outdated Show resolved Hide resolved
src/akushon/action/model/action.cpp Outdated Show resolved Hide resolved
src/akushon/action/node/action_manager.cpp Outdated Show resolved Hide resolved
src/akushon/action/node/action_manager.cpp Outdated Show resolved Hide resolved
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.

2 participants