Skip to content

コンフィグファイルの再読込への対応 #26

@ShotaAk

Description

@ShotaAk

現状の問題点

hardware.load_config_file("../config/crane-x7.yaml");でコンフィグファイルを読み込みますが、
一つのHardwareインスタンスに対して1回の読み込みにしか対応していません。

load_config_file()を2回実行するとエラーが発生します。

改善案

load_config_file()を複数回実行できるように実装を変更します。

load_config_file()内で使用しているhardware_joints::Jointsを初期化すれば再読込が可能です。

ただし、実機との通信中にjointsを初期化して問題ないか検証が必要です。

bool Hardware::load_config_file(const std::string& config_yaml) {
// コンフィグファイルの読み込み
if (config_file_parser::parse(config_yaml, joints_) == false) {
return false;
}

代替案

その他

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions