I have a little problem with my simulator:
Lua API call error: [string "SCRIPT Quadricopter"]:83: Topic could not be published. (simExtROS_enablePublisher)
and the Lua script is as follows:
Code: Select all
frontCam=simGetObjectHandle('Quadricopter_frontCamera') topicName=simExtROS_enablePublisher('front_cam',1,simros_strmcmd_get_vision_sensor_image,f,-1,'')
Code: Select all
d=simGetObjectHandle('Quadricopter_base')
topicName1=simExtROS_enablePublisher('drone_pose',1,simros_strmcmd_get_object_pose,d,-1,'')
Code: Select all
Lua API call error: [string "SCRIPT Quadricopter"]:159: One of the function's argument type is not correct. (simSetObjectOrientation)
Code: Select all
subscriberID=simExtROS_enableSubscriber('cmd_deplace',1,simros_strmcmd_set_object_pose,d,1,'')
Code: Select all
if (subscriberID == -1)then
simSetObjectPosition(targetObj,sim_handle_parent,{0,0,0})
simSetObjectOrientation(targetObj,sim_handle_parent,{0,0,0})
else
simSetObjectPosition(targetObj,sim_handle_parent,{'cmd_deplace.pose.position.x','cmd_deplace.pose.position.y','cmd_deplace.pose.position.z'})
simSetObjectOrientation(targetObj,sim_handle_parent,{'cmd_deplace.pose.orientation.x','cmd_deplace.pose.orientation.y','cmd_deplace.pose.orientation.z'})
end
end
THX