Skip to content

Commit

Permalink
fixed bug: advertise unsupported streams. (IntelRealSense#811)
Browse files Browse the repository at this point in the history
* fixed bug: advertise unsupported streams.
* constraints on accel_up test - loosen up a bit to compensate for different in frames arriving from file.
  • Loading branch information
doronhi authored Jul 4, 2019
1 parent c1010ab commit 387f12b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion realsense2_camera/scripts/rs2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def AccelGetData(rec_filename):
def AccelGetDataDeviceStandStraight(rec_filename):
gt_data = AccelGetData(rec_filename)
gt_data['ros_value'] = np.array([0.63839424, 0.05380408, 9.85343552])
gt_data['ros_max_diff'] = np.array([1.97013582e-02, 4.65862500e-09, 2.06165277e-02])
gt_data['ros_max_diff'] = np.array([1.97013582e-02, 4.65862500e-09, 4.06165277e-02])
return gt_data

def ImuTest(data, gt_data):
Expand Down
3 changes: 2 additions & 1 deletion realsense2_camera/src/base_realsense_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ void BaseRealSenseNode::publishTopics()
getParameters();
setupDevice();
setupErrorCallback();
enable_devices();
setupPublishers();
setupStreams();
setupFilters();
Expand Down Expand Up @@ -866,6 +867,7 @@ void BaseRealSenseNode::enable_devices()
if (profile.stream_type() != elem.first) continue;
ROS_WARN_STREAM("fps: " << profile.fps() << ". format: " << profile.format());
}
_enable[elem] = false;
}
}
}
Expand Down Expand Up @@ -1550,7 +1552,6 @@ void BaseRealSenseNode::setBaseTime(double frame_time, bool warn_no_metadata)
void BaseRealSenseNode::setupStreams()
{
ROS_INFO("setupStreams...");
enable_devices();
try{
// Publish image stream info
for (auto& profiles : _enabled_profiles)
Expand Down

0 comments on commit 387f12b

Please sign in to comment.