Matlab Ros Gazebo Add force to Ball
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello together,
I'm a beginner with Matlab Gazebo tool, so I'm working with a virtual Machine using the VMWare Workstation with an Gazebo world.
In these World there is the turtle bot, so i was folliwing the tutorial of the https://de.mathworks.com/support/product/robotics/ros2-vm-installation-instructions-v3.html site.
So now i spawned several models to the gazebo (following the https://de.mathworks.com/help/ros/ug/add-build-remove-objects-in-gazebo.html tutorial) world but there are some errors with the ExampleHelperGazeboSpawnedModel function.
If I want to get the state of the model to add some forc to the ball, then i get the error:
Error using ExampleHelperGazeboSpawnedModel/getState (line 104)
Error during service call, cannot get the state of the model
Error in ExampleHelperGazeboSpawnedModel (line 70)
[obj.Position, obj.Orientation, obj.Velocity] = getState(obj);
I was checking the ExampleHelperGazeboSpawnedModel()-function. There at Line 70, the function calls the
msg = call(obj.GetStateClient,serviceMsg);
then the error occorus.
I'm working with Matlab2020b, so the current verison. I found some workaround (https://de.mathworks.com/matlabcentral/answers/423993-spawnmodel-error-in-robotics-system-toolbox) to solve these problem, to change some java files on my host PC, but these java-file witch i did not found on my pc.
So does anybody know some other idea to solve these problem?
Thank you very much in advance.
Regards,
Philipp
댓글 수: 0
답변 (1개)
Cam Salzberger
2020년 11월 23일
Hello Philipp,
There is an issue with the specific service definition that is used in that call command. We are working on a resolution for this issue.
A somewhat time-consuming workaround in the meantime would be to regenerate the gazebo_msgs package (using the Melodic version of the package) using rosgenmsg. I believe this should ensure that the service is able to communicate, though I have not tested this personally.
-Cam
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Network Connection and Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!