-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
How do i get position and angles data from my d435i? #10043
Comments
Hi @MyOtherNamesWereTaken Obtaining both the angle and position of something is known as its pose, and therefore the process of calculating these values is pose estimation. This is a difficult problem for D435i, as unlike the T265 Tracking Camera model it does not have built-in support for pose stream data. It is possible to obtain pose with a D435i though by using ROS or OpenCV. If you wish to avoid using ROS as part of your solution then you may prefer to obtain the pose of an observed object using an OpenCV SolvePNP algorithm. The official OpenCV documentation has a Python tutorial for this at the link below. https://docs.opencv.org/4.x/d7/d53/tutorial_py_pose.html If you are able to use ROS to obtain the pose of an object then there are a range of available solutions, such as Deep Object Pose Estimation (DOPE) that uses a technique called inference. https://github.com/NVlabs/Deep_Object_Pose In regard to obtaining the pose of the D435i camera itself, this could be more complicated. It is straightforward to obtain the angle of the camera from its IMU using Python code such as the example in #3917 (comment) or without using the IMU by performing a plane-fit algorithm (see the link below for more information). https://support.intelrealsense.com/hc/en-us/community/posts/360050894154/comments/360013322694 For obtaining the relative position of the camera on a real-world map, you could consider doing so using ROS and SLAM, as described at #8692 (comment) |
Hi @MyOtherNamesWereTaken Do you require further assistance with this case, please? Thanks! |
I just need to figure out the cameras rotation (to itself) via the gyro/accel. As in i need the Roll, Yaw and Pitch. I want the z axis to be on the cameras length axis and the x axis where the camera lenses "look out of". Im basically holding the camera vertically and i can ignore the rotation on the said x-axis. How do i program this? def initialize_camera(): pipeline = initialize_camera() first = True try:
finally: This is my code so far but:
|
As you started another case with a new approach in #10092 do you still require assistance with this case here, please? |
U can close this case, thanks |
Thanks very much @MyOtherNamesWereTaken |
I have a problem in my code. I want to know if there is a rotation in wrist and neck landmarks. Function to calculate angledef calculate_angle(a, b, c):
mp_drawing = mp.solutions.drawing_utils Setup MediaPipe instancemp_pose = mp.solutions.pose Configure RealSense pipelinepipeline = rs.pipeline() Start streamingpipeline.start(config) Create CSV file to write datawith open('angles1.csv', mode='w', newline='') as file:
|
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
Hello.
I am trying to get following data from my d435i
-xyz angles (to itself and the object)
-xyz position (of itself and the object)
The text was updated successfully, but these errors were encountered: