Closed nanbwrn closed 1 year ago
Hi @nanbwrn, Judging from the snippet you've sent, I'm assuming your using processLog.m to plot the contents of a recorded bag. From what I can tell, MATLAB is probably taking exception to the naming of the trial or the bag contents itself. Typically the code looks for a file named 'robot_1_quad_log_bag' in the /quad_logger/bags directory and runs the code with that as the trialName and the default namespace of 'robot_1'.
It might be easier for you to bypass this and set the trialName to '' and select the bag directly using the UI.
More detailed steps to run scripts can be found here: https://github.com/robomechanics/quad-sdk/wiki/3.-Processing-Data-Logs
Hope this helps, David Ologan
Hi @ologandavid ,
Thank you for your prompt response. I followed the steps you mentioned and did it again. The general steps I ran are as follows: I ran it in MATLAB on a Windows system. I copied the "quad_logger/scripts" folder from the "quad_sdk" to MATLAB in my Windows system, and I also copied the "robot_1_quadlog.bag" file(decompressed file) into it .
After running the program, I encountered the following error: How can this be resolved?
Hi @nanbwrn, If you're looking at a bag file you recorded in sim feel free to comment those lines out given that your state estimate topic and your trajectory should be empty. In simulation, your state comes directly from gazebo so nothing gets published there. Empty topics shouldn't stop the rest of the code from running though.
To debug, I would first check to make sure that stateGroundTruth is populated, (comment everything else out) just to make sure matlab is recognizing your desired bag. Did the UI work for you when selecting a bag? If so, matlab should output plots of joint angles, joint states, body velocity etc.
Best, David
thank you for you response. I'll continue to give it a try.
What steps are required to run scripts in quad logs in Matlab? I added these two variables according to the steps in the Wiki. I added trialName='quadlog ';%(The file name of the bag) namespace='robot 1 '; The values of these two variables encountered an error while running proscessLog. m
What are the detailed steps for running MATLAB scripts? Thank you