I control the YouBot's omnidirectional wheels with a client in C++, but now I want to add a laser to my application.
I am using the Hokuyo Laser as a child of the Kuka's YouBot but when I call the function:
Code: Select all
result=simLaunchExecutable('Client',portNb.." "..wheelJoints[1].." "..wheelJoints[2].." "..wheelJoints[3].." "..wheelJoints[4].." "..laserHandle,0)
Lua runtime error: [string "SCRIPT youBot#0"]:85: attempt to concatenate global 'laserHandle' (a nil value)
And if I try to use the initialization instructions on the child script from Hokuyo:
Code: Select all
laserScannerHandle=simGetObjectHandle("Hokuyo_URG_04LX_UG01")
laserScannerObjectName=simGetObjectName(laserScannerHandle)
communicationTube=simTubeOpen(0,laserScannerObjectName..'_HOKUYO',1)
Lua call error: [string "SCRIPT youBot#0"]:15: Object does not exist. (simGetObjectHandle)
Lua call error: [string "SCRIPT youBot#0"]:16: Object does not exist. (simGetObjectName)
Lua runtime error: [string "SCRIPT youBot#0"]:17: attempt to concatenate global 'laserScannerObjectName' (a nil value)
I did not change the Hokuyo's script.
The YouBot script is non-threaded, could this be the problem?
How can I send the laser as an argument to my client?}
Thanks!