pyrealsense2 has no attribute context
| Required Info | |
|---|---|
| Camera Model | D455 |
| Firmware Version | 5.16.0.1 |
| Operating System & Version | Ubuntu 22.04 |
| Kernel Version (Linux Only) | 5.15 |
| Platform | Jetson Orin,Jetpack 6 |
| SDK Version | 2.55.1.0 } |
| Segment | Robot |
Issue Description
Trying to calibrate IMU, using python rs-imu-calibration.py script but unable to.
Tried other posts for import pyrealsense2.pyrealsense as rs but still same.
Installing pip install pyrealsense2 worked but still trying the script for imu calibration gives error
SDK built using RUSB
Hi @anath93 Is the camera detected if you launch the IMU calibration script in sudo admin permissions mode, please?
sudo python3 rs-imu-calibration.py
@MartyG-RealSense
Another weird issue
@MartyG-RealSense the only way Motion module force pause goes away is if I use development branch from librealsense wrapper and I can see gyro values but still unable to use rs-imu calibrate.
Does it make a difference if you edit the pyrealsense2 import line of the rs-imu-calibration.py script from this:
import pyrealsense2 as rs
to this:
import pyrealsense2.pyrealsense2 as rs
https://github.com/IntelRealSense/librealsense/blob/master/tools/rs-imu-calibration/rs-imu-calibration.py#L10
No it does not, same result. Tried that already.
If you have access to the RealSense Viewer tool, what is the value of Y on the 'Accel' panel if you enable the Motion Module in the Viewer's options side-panel? You can see the Accel values if you hover the mouse cursor over the Accel panel.
The ideal target value of Y Accel is '-9.80' when the camera is resting stationary on a flat surface. If your Viewer shows the Y Accel value as significantly lower than this target, such as -9.3 or -9.4, then it is evidence that your IMU needs calibration. If your Y value is closer to -9.80 though, such as -9.75, then your IMU calibration is likely already good and does not need recalibrating with rs-imu-calibration.py
Hi @anath93 Do you require further assistance with this case, please? Thanks!
@MartyG-RealSense Thank you for the help. I am closing the ticket here, I am working with your backend team over internal ticket as this is issue and there is workaround.
You are very welcome, @anath93 - thanks very much for the update!
Did you find a solution to this?