Unify navigation on NavigateToPose and remove legacy proxies
This commit is contained in:
@@ -14,5 +14,5 @@ cd "$bt_repo_root"
|
||||
# Install/build upstream BehaviorTree.CPP 4.10.0 separately and source its prefix.
|
||||
# EXACT REQUIRED intentionally rejects an incompatible system BT.CPP package.
|
||||
colcon build --base-paths ros2 --packages-up-to bt_executor robobrain_services bt_mock_servers --event-handlers console_direct+
|
||||
colcon test --packages-select bt_skill_interfaces bt_executor --event-handlers console_direct+
|
||||
colcon test --packages-select navigation_interfaces bt_skill_interfaces bt_executor --event-handlers console_direct+
|
||||
colcon test-result --verbose
|
||||
|
||||
@@ -38,8 +38,8 @@ def header_name(name):
|
||||
|
||||
|
||||
for source in list((PACKAGE / 'src').glob('*.cpp')) + list((PACKAGE / 'include/bt_executor').glob('*.hpp')):
|
||||
for kind, name in re.findall(r'bt_skill_interfaces/(action|msg)/(\w+)\.hpp', source.read_text()):
|
||||
candidates = list((PACKAGE.parent / 'bt_skill_interfaces' / kind).glob('*'))
|
||||
for package, kind, name in re.findall(r'(bt_skill_interfaces|navigation_interfaces)/(action|msg)/(\w+)\.hpp', source.read_text()):
|
||||
candidates = list((PACKAGE.parent / package / kind).glob('*'))
|
||||
assert any(header_name(v.stem) == name for v in candidates), (source, kind, name)
|
||||
ET.parse(PACKAGE / 'package.xml')
|
||||
print(f'Static checks passed: {len(actual)} ordered core stages, six skill templates, generated IDL include names, package XML.')
|
||||
|
||||
@@ -20,7 +20,7 @@ int main(int argc,char** argv) {
|
||||
while(!driver.ready(robot_bt::Skill::NAVIGATE)&&robot_bt::SteadyClock::now()<until) {
|
||||
rclcpp::spin_some(node); std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||
}
|
||||
if(!driver.ready(robot_bt::Skill::NAVIGATE)) throw std::runtime_error("Navigate discovery timed out");
|
||||
if(!driver.ready(robot_bt::Skill::NAVIGATE)) throw std::runtime_error("NavigateToPose discovery timed out");
|
||||
robot_bt::GoalRequest request;
|
||||
request.goal_id="probe-"+std::to_string(scenario);request.robot_id="robot_01";
|
||||
request.trace.task_id=request.goal_id;request.trace.run_id=request.goal_id;request.trace.subtask_id="navigate";
|
||||
@@ -35,7 +35,7 @@ int main(int argc,char** argv) {
|
||||
rclcpp::spin_some(node);registry.pump(robot_bt::SteadyClock::now());
|
||||
auto record=registry.find(active_id);
|
||||
if(!record) throw std::runtime_error("registry lost active goal: "+active_id);
|
||||
if((scenario==1||scenario==6)&&record->accepted&&!canceled) {
|
||||
if((scenario==1||scenario==6||scenario==9)&&record->accepted&&!canceled) {
|
||||
registry.request_cancel(active_id,robot_bt::SteadyClock::now());canceled=true;
|
||||
}
|
||||
if(record->result) break;
|
||||
@@ -51,7 +51,7 @@ int main(int argc,char** argv) {
|
||||
if(!record||!record->result) throw std::runtime_error("result timeout");
|
||||
const auto& result=*record->result;
|
||||
bool blocked_redispatch=false;
|
||||
if(scenario==6) {
|
||||
if(scenario==6||scenario==9||scenario==10) {
|
||||
auto next=request;next.goal_id+="-forbidden-retry";
|
||||
next.trace.subtask_id="navigate-forbidden-retry";++next.trace.attempt;
|
||||
blocked_redispatch=!registry.start(next,robot_bt::SteadyClock::now()).has_value();
|
||||
|
||||
Reference in New Issue
Block a user