Skip to content

Commit

Permalink
make all topics have the same frame_id because they come from the sam…
Browse files Browse the repository at this point in the history
…e sensor
  • Loading branch information
cyborg-x1 committed Jan 27, 2016
1 parent 55201f0 commit 8781a47
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions h4r_ev3_control/src/h4r_ev3_control/ev3_infrared_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,7 @@ bool Ev3InfraredController::init(Ev3SensorInterface* hw,
ROS_INFO_STREAM("Parameter min_range not given or wrong type, using 0");
}

if (!ctrl_nh.getParam("frame_id", frame_id_))
{
frame_id_=port_;
ROS_INFO_STREAM("Parameter frame_id not given or wrong type, using "<<port_);
}


if(max_range_>2.50)
{
Expand Down Expand Up @@ -228,6 +224,7 @@ bool Ev3InfraredController::init(Ev3SensorInterface* hw,
realtime_seek_publishers_[i] = RtSeekPublisherPtr(
new realtime_tools::RealtimePublisher<h4r_ev3_msgs::Seek>(
root_nh, topic_name, 4));

}
break;

Expand All @@ -249,13 +246,6 @@ bool Ev3InfraredController::init(Ev3SensorInterface* hw,
ROS_INFO_STREAM("Parameter "<<param_name<<" not given using "<<topic_name<<" for channel "<<i);
}

param_name="frame_id_"+number;
if (!ctrl_nh.getParam(param_name, frame_id_))
{
frame_id_=port_+"_ir_remote_"+number;
ROS_INFO_STREAM("Parameter "<<param_name<<" not given using "<<frame_id_<<" for channel "<<i);
}


realtime_joy_publishers_[i] = RtJoyPublisherPtr(
new realtime_tools::RealtimePublisher<sensor_msgs::Joy>(
Expand Down

0 comments on commit 8781a47

Please sign in to comment.