Skip to content

Commit 81f49f0

Browse files
Merge pull request #4 from dortmans/master
Segmentation fault removed
2 parents 3c12c6e + 7666720 commit 81f49f0

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

launch/test_client.launch

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<launch>
2+
<node pkg="behaviortree_ros" type="test_bt" name="test_bt" output="screen" />
3+
</launch>

launch/test_server.launch

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<launch>
2+
<node pkg="behaviortree_ros" type="test_server" name="test_server" output="screen" />
3+
</launch>

test/test_server.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ class FibonacciServer
4545

4646
void executeCB(const behaviortree_ros::FibonacciGoalConstPtr &goal)
4747
{
48-
// publish info to the console for the user
49-
ROS_INFO("%s: Executing, creating fibonacci sequence of order %i with seeds %i, %i",
50-
action_name_.c_str(), goal->order, feedback_.sequence[0], feedback_.sequence[1]);
51-
5248
// calculate the result
5349
// push_back the seeds for the fibonacci sequence
5450
feedback_.sequence.clear();
5551
feedback_.sequence.push_back(0);
5652
feedback_.sequence.push_back(1);
53+
// publish info to the console for the user
54+
ROS_INFO("%s: Executing, creating fibonacci sequence of order %i with seeds %i, %i",
55+
action_name_.c_str(), goal->order, feedback_.sequence[0], feedback_.sequence[1]);
56+
5757
for(int i=1; i<=goal->order; i++)
5858
{
5959
feedback_.sequence.push_back(feedback_.sequence[i] + feedback_.sequence[i-1]);

0 commit comments

Comments
 (0)