-
Notifications
You must be signed in to change notification settings - Fork 21
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 to set the Orientation of IMU in Robot Module #36
Comments
simplescreenrecorder-2025-01-13_16.48.01.mp4When I start BWC, there is a green arrow fluttering everywhere. Does this relate to the setting of IMU? |
I assume you have added the IMU in the MuJoCo model (*.xml). If the IMU is added with the same rotation between the MuJoCo model and the robot module, there is no problem.
The green arrow drawing depends on the situation and is not necessarily a problem with IMU. In the video the robot is falling over from the beginning, why is that? I suggest you try with mc_rtc_ticker with sensor feedback disabled as described in the documentation. |
I tried as document described. Everything is correct as I using rviz and mc_rtc_ticker to simulate. The video is below: simplescreenrecorder-2025-01-14_09.37.50.mp4 |
I also checked xml file. I have already added an IMU in the xml file. Is it necessary to add an IMU description in cpp file? |
If “cpp file” refers to RobotModule, then Yes; the IMU settings must be consistent (e.g., same position and orientation) between the MuJoCo model (xml) and RobotModule (cpp). |
``> > Is it necessary to add an IMU description in cpp file?
May I ask how should I add an IMU setting in RobotModule ,I didn't find any related code in jvrc1.cpp. I add this code in my RobotModule: |
Yes, that is correct. |
I got it, thanke you. simplescreenrecorder-2025-01-17_14.53.10.mp4What parameter should I adjust to make the robot walk stable in mujoco. |
Try the followings:
|
Thank you for your help. I met a new problem.The video is below: https://github.com/user-attachments/assets/fd7848ba-853f-49fc-bfeb-1836af47cdbd |
This seems to be a problem with mujoco's mesh contact detection. I suggest replacing the collision shape of the foot link with a simple BOX. |
I solved the question by using the method you mentioned. Thank you! Now the robot can walk well in x axis. However, things changed when the robot walking in y axis. The robot has a kind of oscillation when walking in y axis. The videos are below: simplescreenrecorder-2025-01-21_14.18.16.mp4simplescreenrecorder-2025-01-21_14.18.49.mp4I tried to adjust the angular parameter of SingleSurpport and DoubleSupport and dcmGainP. But it does nothing to walk. Do I need to adjust other parameters or keep adjusting the parameters mentioned in the comment? |
Since the robot's legs are fully extended and its feet are not reaching the target position, it is recommended to further reduce refComZ as described above to bend the legs. |
After running mc_mujoco, the robot falls down from the beginning. According to the tips, I tried to add an IMU orientation in the Robot module as below:
_bodySensors.emplace_back("imu", "base_link", sva::PTransformd::Identity());
just like other sensors. Is this the right method to add an IMU in RobotModule? If it is wrong. what should I do to add the orientation of IMU.
The text was updated successfully, but these errors were encountered: