I’m attempting to modify dbaldwin’s go-1-math-motion scripts to use position data to tell the robot when to stop moving in a circle. I am struggling to access any sort of orientation data from the Go1’s sensors. I was under the impression that the already running UDP communication loop provided in the twist_sub.cpp file was retrieving this info from the Go1 and storing it within the custom class’s LowState or HighState variable. However, when outputting the value of the quaternion, gyroscope, accelerometer or IMU values within either the LowState or HighState variables, I get nothing but zeros, no matter how I move the robot. Am I doing something wrong, or is this data not being retrieved through the UDP communication as I thought?
As a simpler request, is there another way to read the roll, pitch, and yaw or quaternion orientation data from the Go1 Edu? I know there’s a way to do it remotely since the Unitree Go1 app on my phone is able to do it just fine. How would I go about doing it within the virtual machine running go1-math-motion?
Can you provide a screenshot of the mobile app? Also, do you have any idea if the web app provides this? Sorry, I don’t have my Go1 near me at the moment. We can certainly look into how we can obtain this lower level data. Thanks.
Here is a screenshot of the app’s “Posture” view in settings that shows the positional data of Go1 including the roll, pitch, and yaw. I was just using this as an example showing that it must be possible to access this data remotely somehow. I was able to access the data when running scripts that were in the Pi on Go1’s filesystem.
However when running similar scripts from my Docker virtual machine, I wasn’t able to access this same data. I attempted to do this through both the HighState and LowState variables within the custom class, but I’m not sure if this is the correct approach.
Thanks for the clarification. We ran into this problem initially and it turned out to be a networking issue. Can you give this video a watch and let us know if it helps out (or not)?
Also, if you want to follow along in the video there is a gist I created in the description. Here it is for reference:
Without modifying iptables we constantly found that all the data were zeroes. I’d like to find out if there may be an easier way to access this as you mentioned it’s available in the mobile app. I’ll keep you posted if we find anything else out.