Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new L515 PID #1248

Merged
merged 1 commit into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion realsense2_camera/include/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ namespace realsense2_camera
const uint16_t RS435i_RGB_PID = 0x0B3A; // AWGC_MM
const uint16_t RS405_PID = 0x0b0c; // DS5U
const uint16_t RS_T265_PID = 0x0b37; //
const uint16_t RS_L515_PID = 0x0B3D; //
const uint16_t RS_L515_PID_PRE_PRQ = 0x0B3D; //
const uint16_t RS_L515_PID = 0x0B64; //


const bool ALIGN_DEPTH = false;
Expand Down
3 changes: 2 additions & 1 deletion realsense2_camera/include/realsense_node_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace realsense2_camera
{
const stream_index_pair COLOR{RS2_STREAM_COLOR, 0};
const stream_index_pair DEPTH{RS2_STREAM_DEPTH, 0};
const stream_index_pair INFRA0{RS2_STREAM_INFRARED, 0};
const stream_index_pair INFRA1{RS2_STREAM_INFRARED, 1};
const stream_index_pair INFRA2{RS2_STREAM_INFRARED, 2};
const stream_index_pair FISHEYE{RS2_STREAM_FISHEYE, 0};
Expand All @@ -35,7 +36,7 @@ namespace realsense2_camera
const stream_index_pair POSE{RS2_STREAM_POSE, 0};


const std::vector<stream_index_pair> IMAGE_STREAMS = {DEPTH, INFRA1, INFRA2,
const std::vector<stream_index_pair> IMAGE_STREAMS = {DEPTH, INFRA0, INFRA1, INFRA2,
COLOR,
FISHEYE,
FISHEYE1, FISHEYE2};
Expand Down
23 changes: 10 additions & 13 deletions realsense2_camera/src/base_realsense_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,37 +705,34 @@ void BaseRealSenseNode::setupDevice()
ROS_INFO_STREAM("Device Sensors: ");
for(auto&& sensor : _dev_sensors)
{
for (auto& profile : sensor.get_stream_profiles())
{
auto video_profile = profile.as<rs2::video_stream_profile>();
stream_index_pair sip(video_profile.stream_type(), video_profile.stream_index());
if (_sensors.find( sip ) != _sensors.end())
continue;
_sensors[sip] = sensor;
}

std::string module_name = sensor.get_info(RS2_CAMERA_INFO_NAME);
if (sensor.is<rs2::depth_sensor>())
{
_sensors[DEPTH] = sensor;
_sensors[INFRA1] = sensor;
_sensors[INFRA2] = sensor;
_sensors_callback[module_name] = frame_callback_function;
}
else if (sensor.is<rs2::color_sensor>())
{
_sensors[COLOR] = sensor;
_sensors_callback[module_name] = frame_callback_function;
}
else if (sensor.is<rs2::fisheye_sensor>())
{
_sensors[FISHEYE] = sensor;
_sensors_callback[module_name] = frame_callback_function;
}
else if (sensor.is<rs2::motion_sensor>())
{
_sensors[GYRO] = sensor;
_sensors[ACCEL] = sensor;
_sensors_callback[module_name] = imu_callback_function;
}
else if (sensor.is<rs2::pose_sensor>())
{
_sensors[GYRO] = sensor;
_sensors[ACCEL] = sensor;
_sensors[POSE] = sensor;
_sensors[FISHEYE1] = sensor;
_sensors[FISHEYE2] = sensor;
_sensors_callback[module_name] = multiple_message_callback_function;
}
else
Expand Down Expand Up @@ -1808,7 +1805,7 @@ void BaseRealSenseNode::calcAndPublishStaticTransform(const stream_index_pair& s
{
if (!strcmp(e.what(), "Requested extrinsics are not available!"))
{
ROS_WARN_STREAM(e.what() << " : using unity as default.");
ROS_WARN_STREAM("(" << rs2_stream_to_string(stream.first) << ", " << stream.second << ") -> (" << rs2_stream_to_string(base_profile.stream_type()) << ", " << base_profile.stream_index() << "): " << e.what() << " : using unity as default.");
ex = rs2_extrinsics({{1, 0, 0, 0, 1, 0, 0, 0, 1}, {0,0,0}});
}
else
Expand Down