Closed EthanZengg closed 5 months ago
Hi @EthanZengg
Hi @mmurooka Thanks for the reply .
Video is as follows: (For better visibility, Rviz only displays the ControlRobotModel) https://github.com/isri-aist/BaselineWalkingController/assets/73087353/9d2131fb-c9c3-41b8-b385-f90b337e8a8e
The commands I ran are as follows:
Terminal 1 $ ./clear-omninames.sh $ choreonoid sim_mc.cnoid --start-simulation
Terminal 2 $ source ~/ros/ws_bwc/devel/setup.bash $ roslaunch baseline_walking_controller display.launch
Hope this helps
Thank you for sharing the video, Rviz has two robots that can be visualized, ControlRobot and RealRobot. Which one is visualized in the video?
Could you try increasing the following parameters by 10 times?
I suspect that there is a large difference in the robot's total mass between the VRML model loaded in Chorenoid and the URDF model referenced in the controller.
it didn't solve the issue. Based on your description, it seems that your guess is correct. The simulation runs very slowly with the VRML. A new video is as follow, the all-black model represents the RealRobot, while the translucent model represents the ControlRobot. Please note that the observation may be slightly challenging due to the absence of mesh files.
Hello @EthanZengg
Are the force sensors of your robot connected to mc_openrtm?
Hello Dr. Gergondet (@gergondet),
I have only attached the rfsensor and lfsensor to the robot, as it seems that the problem is not related to other sensors ( that's my guess). The attached pictures depict the robot's RTsystem configuration.
This configuration appears to be the cause of the problem. Could you please provide me with some advice on how to address it?
Indeed, the video looks like the robot's behavior when the force sensor value is zero all the time. Could you share the mc_rtc log (*.bin file in /tmp) to confirm this?
However, I do not know why the force sensor value is zero all the time. The RTC port connections above appear to be correct. Can you confirm that the force sensor values are correct on Choreonoid according to the following document? https://choreonoid.org/en/documents/1.5/simulation/sensor-visualization.html
Thank you for your notification. I discovered that the orientation of the force sensor was incorrect, and I promptly corrected it. The subsequent images depict the body state view on Choreonoid and the mc_rtc log related to the RightFootForceSensor. It seems that the data is correct now after the correction. Nevertheless, the issue persists.
Thank you for your patient response. Could you please provide me with a few more hints?
Since the same sensor values are described in the Choreonoid and the mc_rtc log, the data port of the RTC is correctly connected. Would you be able to share the mc_rtc log in some way so that we can examine it more closely?
Thanks for the reply.The latest mc_rtc log (*.bin file) has been sent to your email and following file is the corresponding video after correcting the orientation of the force sensor . I hope this will be helpful
Large forces are recorded in FootTask_Left_measuredWrench_fx in the log, which means that the X-axis of the foot surface is in the vertical direction. BaselineWalkingController (and many other mc_rtc contrllers) assume that the normal direction of the surface is the Z axis. It is necessary to modify the RSDF file, etc. accordingly.
Dear mmurooka,
Thank you for your patient and helpful responses, which enabled me to successfully fix the bug! !
Best regards, EthanZengg
@EthanZengg Good! I would appreciate it if you could post a video of the robot walking.
Dear mmurooka,
It's my honor. However, The robot is currently facing challenges in keeping steady while walking due to other issues (I guess), such as format conversion problem about VRML by simtrans ) , Other Sensors addition(gsensor, gyrometer, etc.), The proper configuration of mc_rtc tasks, ect. I will resolve these issues one by one diligently.
Once again, sincerely grateful for your generous sharing of numerous controllers, which greatly aided me when I first started working with biped robots.
Best regards, EthanZengg
Force sensor measurements do not depend on mesh coordinates or RSDF, but only on the sensor coordinates defined in the robot module class. example: https://github.com/jrl-umi3218/mc_rtc/blob/69397dc8f1494c49af9be0a2051e9dc20d74844d/src/mc_robots/jvrc1.cpp#L98
In the first case of your comment above, how about changing the orientation of the force sensor coordinates, e.g. sva::PTransformd(sva::RotX(0.5 * mc_rtc::constants::PI))
or sva::PTransformd(sva::RotY(0.5 * mc_rtc::constants::PI ))
?
Force sensor measurements do not depend on mesh coordinates or RSDF, but only on the sensor coordinates defined in the robot module class.
That's not exactly correct. The wrench in the graph is coming from a foot task so this is obtained via robot().frame().wrench()
which is different from robot().forceSensor().wrench()
in two ways.
robot().forceSensor().wrench()
only depends on the information provided by the interfacerobot().frame().wrench()
depends on the transformation between the frame and the sensor (which is generally defined by the transformation between the sensor and its parent body and by the transformation between the frame and its parent bodyWhen we define a surface in an rsdf file, we specify a frame relative to its parent body so changing the rsdf will change the wrench you observe in the task.
Note: it is however correct that mesh coordinates have no effect at all.
In the first case of your comment above, how about changing the orientation of the force sensor coordinate
Given that it was working before, I'm guessing there was a recent change in the simulation model that was not reflected on mc_rtc side. Possibly the force sensor was rotate in the model used by Choreonoid but not by mc_rtc
@gergondet, thanks for the correction, that's right!
Hello, Dr. Gergondet (@gergondet),
I apologize for bothering you, but I am experiencing some issues with the controller on my robot. During double foot support periods, the robot loses contact with the floor, and its feet cross the ground. However, during the walking process, this problem disappears. The process unfolds as follows:
It seems that there is an issue with the contact setting during the double foot support periods. Could you please provide me with some advice on how to address this problem?
Thank you for your time and assistance.
Best regards, Ethan