Skip to content

Commit b4b49fa

Browse files
SteveMacenskimlherdJconn
authored
Eloquent sync (#1577)
* added a red circle for target pose location. changed the way marker id numbers are generated. resized markers * edited a comment line * cherry-picking mjeronimo:fix_bt_crash_after_reset (#1515) * syncing eloquent with 1940266 * bump to 0.3.4 Co-authored-by: Melih Erdogan <[email protected]> Co-authored-by: John Connolly <[email protected]>
1 parent d44596c commit b4b49fa

File tree

42 files changed

+230
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+230
-76
lines changed

nav2_amcl/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>nav2_amcl</name>
5-
<version>0.3.3</version>
5+
<version>0.3.4</version>
66
<description>
77
<p>
88
amcl is a probabilistic localization system for a robot moving in

nav2_behavior_tree/include/nav2_behavior_tree/behavior_tree_engine.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class BehaviorTreeEngine
3535
virtual ~BehaviorTreeEngine() {}
3636

3737
BtStatus run(
38-
std::unique_ptr<BT::Tree> & tree,
38+
BT::Tree * tree,
3939
std::function<void()> onLoop,
4040
std::function<bool()> cancelRequested,
4141
std::chrono::milliseconds loopTimeout = std::chrono::milliseconds(10));

nav2_behavior_tree/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>nav2_behavior_tree</name>
5-
<version>0.3.3</version>
5+
<version>0.3.4</version>
66
<description>TODO</description>
77
<maintainer email="[email protected]">Michael Jeronimo</maintainer>
88
<maintainer email="[email protected]">Carlos Orduno</maintainer>

nav2_behavior_tree/src/behavior_tree_engine.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ BehaviorTreeEngine::BehaviorTreeEngine(const std::vector<std::string> & plugin_l
3636

3737
BtStatus
3838
BehaviorTreeEngine::run(
39-
std::unique_ptr<BT::Tree> & tree,
39+
BT::Tree * tree,
4040
std::function<void()> onLoop,
4141
std::function<bool()> cancelRequested,
4242
std::chrono::milliseconds loopTimeout)
@@ -51,10 +51,10 @@ BehaviorTreeEngine::run(
5151
return BtStatus::CANCELED;
5252
}
5353

54-
onLoop();
55-
5654
result = tree->root_node->executeTick();
5755

56+
onLoop();
57+
5858
loopRate.sleep();
5959
}
6060

nav2_bringup/bringup/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>nav2_bringup</name>
5-
<version>0.3.3</version>
5+
<version>0.3.4</version>
66
<description>Bringup scripts and configurations for the navigation2 stack</description>
77
<maintainer email="[email protected]">Michael Jeronimo</maintainer>
88
<maintainer email="[email protected]">Steve Macenski</maintainer>

nav2_bringup/nav2_gazebo_spawner/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>nav2_gazebo_spawner</name>
5-
<version>0.3.3</version>
5+
<version>0.3.4</version>
66
<description>Package for spawning a robot model into Gazebo for navigation2</description>
77
<maintainer email="[email protected]">lkumarbe</maintainer>
88
<maintainer email="[email protected]">lkumarbe</maintainer>

nav2_bt_navigator/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ set(library_name ${executable_name}_core)
3232

3333
add_library(${library_name} SHARED
3434
src/bt_navigator.cpp
35+
src/ros_topic_logger.cpp
3536
)
3637

3738
set(dependencies

nav2_bt_navigator/include/nav2_bt_navigator/bt_navigator.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ class BtNavigator : public nav2_util::LifecycleNode
119119
// The wrapper class for the BT functionality
120120
std::unique_ptr<nav2_behavior_tree::BehaviorTreeEngine> bt_;
121121

122-
// The complete behavior tree that results from parsing the incoming XML
123-
std::unique_ptr<BT::Tree> tree_;
124-
125122
// Libraries to pull plugins (BT Nodes) from
126123
std::vector<std::string> plugin_lib_names_;
127124

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Copyright (c) 2019 Intel Corporation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#ifndef NAV2_BT_NAVIGATOR__ROS_TOPIC_LOGGER_HPP_
16+
#define NAV2_BT_NAVIGATOR__ROS_TOPIC_LOGGER_HPP_
17+
18+
#include <vector>
19+
#include "behaviortree_cpp_v3/loggers/abstract_logger.h"
20+
#include "rclcpp/rclcpp.hpp"
21+
#include "nav2_msgs/msg/behavior_tree_log.hpp"
22+
#include "nav2_msgs/msg/behavior_tree_status_change.h"
23+
24+
namespace nav2_bt_navigator
25+
{
26+
27+
class RosTopicLogger : public BT::StatusChangeLogger
28+
{
29+
public:
30+
RosTopicLogger(const rclcpp::Node::SharedPtr & ros_node, const BT::Tree & tree);
31+
32+
void callback(
33+
BT::Duration timestamp,
34+
const BT::TreeNode & node,
35+
BT::NodeStatus prev_status,
36+
BT::NodeStatus status) override;
37+
38+
void flush() override;
39+
40+
protected:
41+
rclcpp::Node::SharedPtr ros_node_;
42+
rclcpp::Publisher<nav2_msgs::msg::BehaviorTreeLog>::SharedPtr log_pub_;
43+
std::vector<nav2_msgs::msg::BehaviorTreeStatusChange> event_log_;
44+
};
45+
46+
} // namespace nav2_bt_navigator
47+
48+
#endif // NAV2_BT_NAVIGATOR__ROS_TOPIC_LOGGER_HPP_

nav2_bt_navigator/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>nav2_bt_navigator</name>
5-
<version>0.3.3</version>
5+
<version>0.3.4</version>
66
<description>TODO</description>
77
<maintainer email="[email protected]">Michael Jeronimo</maintainer>
88
<license>Apache-2.0</license>

0 commit comments

Comments
 (0)