I was trying to manipulate my robot with ROS2 and while the tutorial script works fine and does publish the "SimulationTime", when i try to publish the robots position i get the following error :
Code: Select all
19: Unsupported message type 'geometry_msgs/Pose'. You may want to add it to meta/interfaces.txt and recompile the ROS2Interface plugin. (in function 'simROS2.createPublisher@simExtROS2Interface')
stack traceback:
[C]: in function 'createPublisher'
[string "Body@childScript"]:19: in function <[string "Body@childScript"]:12>
Code: Select all
function sysCall_init()
objectHandle=sim.getObjectAssociatedWithScript(sim.handle_self)
objectName=sim.getObjectName(objectHandle)
if simROS2 then
publisher=simROS2.createPublisher('/pos_rob','geometry_msgs/Pose')
end
function sysCall_actuation()
if simROS2 then
objPos = sim.getObjectPosition(objHandle,-1)
simROS2.publish(publisher,simxGetObjectPose(objectHandle,-1))
end
end