I amt trying to do rosbag play -l laser.bag and after I tried the rqt_plot /laser_scan/ranges[100]
but I don’t why I get a error saying that Plugin Manager could not load plugin. I aslo got a smiliar issue for the excerise 10.2 when I tried to add /joint_states/velocity[0] in rqt_plot.
When you are playing the rosbag, do you see the robot move? Most probably it won’t.
You must pause gazebo physics before playing rosbag and unpause gazebo physics after rosbag playback is complete.
So, try launching rqt_plot with your rosbag after pausing gazebo physics. The error might be gone.
I am still facing the error infact this error is happen even for my previous excerise too. I tried the above steps you mentioned
roslaunch
rosservice call gazebo pause physics
rqt_plot
The thing is now I cannot see the /topic that I am adding in rqt_plot by using that + sign not only this rosbag excerise but also for the previous Plot topic data excerise because whenever I use the plus sign in rqt_plot I get an attribute error. Below is the my error in terminal when I run the Plot topic data excerise. I am using the /topic that is mentioned in the excerise but still I cannot add it into my rqt_plot and moreover It throws an attribute error what wrong am I doing here.
To correct this you have to go the folder: “/opt/ros/noetic/lib/python3/dist-packages/rqt_plot/” and edit the file “rosplot.py” changing “string.atoi(str)” to “int(str)” (line 200)
I think your ROS version needs an update. I think The Construct team can help you with the update.
Of course, I use the full roslaunch command with pkg_name and file.launch it was just to give to you an idea of steps I followed from your previous response.
And the ros version I use is ros noetic. Thank you clarifying the error in rosplot.py I tried to change the 200th line “string.atoi(str)” to “int(str)” but the thing is I don’t find this string.atoi function in 200th line. I think its time to contact the support team.
When I open in VScode I can’t see find atoi in my rosplot.py but when i do cat in terminal I can see atoi in the exact same line. But its the same file and even the file path is correct.
Wow!.. That is weird. But at least we now know “atoi” exists in one file.
Try to use the terminal. Don’t use the IDE.
Open up the file using nano
cd /opt/ros/noetic/lib/python3/dist-packages/rqt_plot
nano ./rosplot.py
Now make the changes string.atoi to int. You just have to delete the two words and replace that with int. Do not change any indentations in the document.
Save and exit the document.
Press Ctrl+X to save the document. When it asks you if your want to save changes type in “y” for yes, and then hit enter.
Let me know if this worked after making the changes.
I tried the nano command which you suggested but that command was not found so I tried with sudo vim and edited the rosplot.py. But still I cannot add the topic in rqt_plot and terminal still throws a similar error like the previous one.
Then I guess, The Construct team has to look into this issue and find a fix.
Most probably update this rqt_plot package to a newer version on your virtual machine.
If you opened the file and in the exact same line it does not contain that string.atoi code, then it is probably loading some “compiled” file that ends with the .pyc extension.
Try to remove a possible dist-packages/rqt_plot/rosplot.pyc (if any exists)