File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -185,8 +185,9 @@ if(CURSES_FOUND)
185
185
list (APPEND BT_SOURCE
186
186
src/controls/manual_node.cpp
187
187
)
188
+ list (APPEND BEHAVIOR_TREE_EXTERNAL_LIBRARIES ${CURSES_LIBRARIES} )
189
+ add_definitions (-DNCURSES_FOUND )
188
190
endif ()
189
- list (APPEND BEHAVIOR_TREE_EXTERNAL_LIBRARIES ${CURSES_LIBRARIES} )
190
191
191
192
192
193
######################################################
Original file line number Diff line number Diff line change 20
20
<depend condition =" $ROS_VERSION == 2" >rclcpp</depend >
21
21
22
22
<depend >libzmq3-dev</depend >
23
+ <depend >libncurses-dev</depend >
23
24
24
25
<export >
25
26
<build_type condition =" $ROS_VERSION == 1" >catkin</build_type >
Original file line number Diff line number Diff line change @@ -55,8 +55,9 @@ BehaviorTreeFactory::BehaviorTreeFactory()
55
55
registerNodeType<SwitchNode<5 >>(" Switch5" );
56
56
registerNodeType<SwitchNode<6 >>(" Switch6" );
57
57
58
+ #ifdef NCURSES_FOUND
58
59
registerNodeType<ManualSelectorNode>(" ManualSelector" );
59
-
60
+ # endif
60
61
for ( const auto & it: builders_)
61
62
{
62
63
builtin_IDs_.insert ( it.first );
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ NodeStatus ManualSelectorNode::selectStatus() const
117
117
uint8_t ManualSelectorNode::selectChild () const
118
118
{
119
119
const size_t children_count = children_nodes_.size ();
120
+
120
121
std::vector<std::string> list;
121
122
list.reserve (children_count);
122
123
for (const auto & child: children_nodes_)
@@ -165,7 +166,7 @@ uint8_t ManualSelectorNode::selectChild() const
165
166
}
166
167
else if ( ch == KEY_UP )
167
168
{
168
- row = ( row == 0 ) ? : row-1 ;
169
+ row = ( row == 0 ) ? (children_count- 1 ) : row-1 ;
169
170
}
170
171
else if ( ch == KEY_ENTER || ch == 10 )
171
172
{
You can’t perform that action at this time.
0 commit comments