- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my project , I need to get the pose information from the d435i; But I found that I could get that in default settings.I use the following code which from the librealsense-master to test why the pose information can not be exported.
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2019 Intel Corporation. All Rights Reserved.
#include <librealsense2/rs.hpp>
#include <iostream>
#include <iomanip>
int main(int argc, char * argv[]) try
{
// Declare RealSense pipeline, encapsulating the actual device and sensors
rs2::pipeline pipe;
// Create a configuration for configuring the pipeline with a non default profile
rs2::config cfg;
// Add pose stream
cfg.enable_stream(RS2_STREAM_POSE, RS2_FORMAT_6DOF);
// Start pipeline with chosen configuration
pipe.start(cfg);
// Main loop
while (true)
{
// Wait for the next set of frames from the camera
auto frames = pipe.wait_for_frames();
// Get a frame from the pose stream
auto f = frames.first_or_default(RS2_STREAM_POSE);
// Cast the frame to pose_frame and get its data
auto pose_data = f.as<rs2::pose_frame>().get_pose_data();
// Print the x, y, z values of the translation, relative to initial position
std::cout << "\r" << "Device Position: " << std::setprecision(3) << std::fixed << pose_data.translation.x << " " <<
pose_data.translation.y << " " << pose_data.translation.z << " (meters)";
}
return EXIT_SUCCESS;
}
catch (const rs2::error & e)
{
std::cerr << "RealSense error calling " << e.get_failed_function() << "(" << e.get_failed_args() << "):\n " << e.what() << std::endl;
return EXIT_FAILURE;
}
catch (const std::exception& e)
{
std::cerr << e.what() << std::endl;
return EXIT_FAILURE;
}
The result tells that the stream of pose can not be opened:
Could you give me a solution for this question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The subject of RS2_STREAM_POSE is discussed here:
https://github.com/IntelRealSense/librealsense/issues/3070
The pose stream was added to the SDK as a feature for the T265 Tracking Camera model. The SDK developers hope to make the pose stream accessible to D435i in the future via RealSense SLAM. The reasons why RealSense SLAM development is difficult for D435i are provided by Dorodnic the RealSense SDK Manager in this comment from the discussion in the link above.
https://github.com/IntelRealSense/librealsense/issues/3070#issuecomment-454689295
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I hope the link below will be of use to you.
https://forums.intel.com/s/question/0D70P000006GEZUSA4
The RealSense T265 has the same IMU component as the D435i. The T265 can provide 6DOF pose though because unlike the D435i, "the VPU employed with T265 is capable of fusing inertial and video sensors to produce a reliable and persistent six degrees of freedom (6DOF) pose, offloading the CPU-intensive calculations from the host PC".
https://www.intelrealsense.com/how-to-getting-imu-data-from-d435i-and-t265/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply. I have read the link and think it is useful .But it's not for my question. The data I want to get is the angular-velocity , accelerated velocity and the pose of the camera. All these data are contained in the class "rs2_pose", and the "rs2::pose_frame" have the function to get the "rs2_pose" of current frame , that's why I show the code. When I add the stream of pose_frame, the camera tell me that there is somethings wrong when open the stream. But thank you all the same!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The subject of RS2_STREAM_POSE is discussed here:
https://github.com/IntelRealSense/librealsense/issues/3070
The pose stream was added to the SDK as a feature for the T265 Tracking Camera model. The SDK developers hope to make the pose stream accessible to D435i in the future via RealSense SLAM. The reasons why RealSense SLAM development is difficult for D435i are provided by Dorodnic the RealSense SDK Manager in this comment from the discussion in the link above.
https://github.com/IntelRealSense/librealsense/issues/3070#issuecomment-454689295
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for quick response. Maybe I choose the wrong way to get the data. I choose the pose_frame only because the class "rs2_pose" contains these data . But I have seen that others have got these data on ROS , Ubuntu. And I think the angular-velocity , accelerated velocity and the orentation of the camera can be supported by the imu and do not need any calculation. Maybe I need choose some other way to get these data. Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page