rossvcclient handshake fail in Matlab2018​a\ros-Kine​tic​\Gazeb​o-7 and Gazebo-8

4 Ansichten (letzte 30 Tage)
I get handshake errors trying to follow the Robotic System Toolbox Example (Add, Build, and Remove Objects in Gazebo). I tried unsuccessfully on two different computers, both with ROS Kinetic and two different versions of Gazebo (7 and 8), I can't control the models (i.e. applyForce) despite I could see those (getSpawnedModels).
After a connection to Gazebo_ros platform with:
rosinit('ipaddress')
gazebo = ExampleHelperGazeboCommunicator();
I Spawn a Simple Sphere despite the handshake error message (I can see the sphere in Gazebo):
ball = ExampleHelperGazeboModel('Ball')
ball =
ExampleHelperGazeboModel with properties:
Name: 'Ball'
ModelObj: [1×1 org.apache.xerces.dom.DocumentImpl]
Links: []
Joints: []
>>
spherelink = addLink(ball,'sphere',0.3,'color',[0 0 1 1])
spherelink =
'link0'
>>
spawnModel(gazebo,ball,[1,0.3,0.3]);
Error using ExampleHelperGazeboCommunicator/startModelServices (line 334)
Failed to create a /gazebo/get_model_state service client.
Error in ExampleHelperGazeboCommunicator/spawnModel (line 290)
startModelServices(obj);
[ERROR] ServiceClientHandshakeHandler - Service client handshake failed: client wants service /gazebo/get_model_state to have md5sum af0f702011820738976b120226dc9d96, but it has 4c515e936d3319c9610c559c60bfc3d4. Dropping connection.
>>
models = getSpawnedModels(gazebo)
models =
2×1 cell array
{'ground_plane'}
{'Ball' }
>>
duration = 1; % Seconds
>>
forcevec = [-25 0 0]; % Newtons
>>
applyForce(spawnedBall, spherelink, duration, forcevec);
Undefined function or variable 'spawnedBall'.

Antworten (1)

YJ Lim
YJ Lim am 16 Aug. 2018
Hi, If you still have the same issues, I wonder if I can have your .m file since I can't mimic your problem at my end. Thanks.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by