Skip to content

Commit

Permalink
changed decision making publish
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitris authored and dimitris committed Jun 17, 2016
1 parent ba11b82 commit fd97474
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions decision_making/config/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ events_topic : "/events"
csv_fields : "Timestamp, Rect_Id, Annotation"
min_depth : 0
max_depth : 6000
history_size : 20
create_directory: true
write_csv : true
history_size : 7
create_directory: false
write_csv : false
display : false
3 changes: 1 addition & 2 deletions decision_making/msg/Event.msg
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
Header header
bool four_meter
bool stand_up
int32 event
16 changes: 8 additions & 8 deletions decision_making/src/decision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Decision_making::Decision_making()
{
//Getting the parameters specified by the launch file
ros::NodeHandle local_nh("~");
local_nh.param("camera_frame" , camera_frame , string("camera_link"));
local_nh.param("camera_frame" , camera_frame , string("camera_link"));
local_nh.param("results_topic" , results_topic , string("results"));
local_nh.param("events_topic" , events_topic , string("events"));
local_nh.param("events_topic" , events_topic , string("events"));
local_nh.param("project_path" , path_ , string(""));
local_nh.param("csv_fields" , csv_fields , string(""));
local_nh.param("max_depth" , max_depth , DEPTH_MAX);
Expand Down Expand Up @@ -39,8 +39,7 @@ void Decision_making::callback(const fusion::FusionMsg::ConstPtr& msg)
decision_making::Event event_msg;
event_msg.header.stamp = msg->header.stamp;
event_msg.header.frame_id = camera_frame;
event_msg.four_meter = false;
event_msg.stand_up = false;
event_msg.event = -1;

for(vector<bool>::iterator it = inserted.begin(); it < inserted.end(); it++)
*it = false;
Expand Down Expand Up @@ -138,7 +137,8 @@ void Decision_making::callback(const fusion::FusionMsg::ConstPtr& msg)
<<i<<"\t"
<<"3\t"<<
endl;
event_msg.stand_up = true;
event_msg.event = 3;
results_publisher.publish(event_msg);
}
}
standUp_time = ros::Time(0);
Expand Down Expand Up @@ -178,8 +178,8 @@ void Decision_making::callback(const fusion::FusionMsg::ConstPtr& msg)
<<i<<"\t"
<<"4\t"<<
endl;
event_msg.four_meter = true;

event_msg.event = 4;
results_publisher.publish(event_msg);
}
}
else
Expand Down Expand Up @@ -217,7 +217,7 @@ void Decision_making::callback(const fusion::FusionMsg::ConstPtr& msg)
}
}

results_publisher.publish(event_msg);


//~ for(vector<float> dist: distances)
//~ {
Expand Down
6 changes: 3 additions & 3 deletions fusion/config/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ csv_fields : "Timestamp, Rect_id, Rect_x, Rect_y, Rect_W, Rect_H, Meter_X,
min_depth : 0
max_depth : 6000
playback_topics : false
create_directory: true
write_csv : true
display : false
create_directory: false
write_csv : false
display : true

0 comments on commit fd97474

Please sign in to comment.