When using the command bellow to modify the drone’s pose (only its position) during sphinx simulation, it results in the model bouncing to randomly (as seen in this video).
This example updates the script parameter of the “calibration” plugin to move the drone 5 meters north (and 20 cm above the ground to prevent any collision):
Thank you for your reply.
When I try to start the sphinx-dashboard, I get the following error:
Using JSON-RPC port 8383.
Error: Cannot connect to sphinx. Is Sphinx running?
When I start sphinx, I do receive the following message indicating that the parameter server has started:
[Msg] Publicized address: 127.0.0.1
[Msg] created parameter server on http:8383
As the title of the documentation you provided says, it is used to simulate an operator/move the drone. Is it a practical way to follow when I need to reset the drone’s position (move it instantly to a specific position inside the world) many times during a single simulation?
I am aware of the parrot-gz world -r command, but it resets the whole world, which doesn’t help me in my case. I need to be able to reset only the position of a specific drone (I am simulating multiple drones at once).
As for the initial_pose you mentioned, it’s the same as setting its spawn_point inside the .world file, right?
Yes, it’s identical to the spawn_point parameter. It lets you update the spawn_point of a drone when sphinx is running without having to restart it. But it requires a world reset.
I get the following output for both of the commands you provided:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 668 100 528 100 140 103k 28000 --:--:-- --:--:-- --:--:-- 130k
Expecting value: line 1 column 1 (char 0)
When the second command is executed, the drone’s position isn’t changed.
I executed the commands with the following differences:
“machine”: “anafi4k_1” instead of “anafi4k” as I spawn it with a different name
curl -d @- http://localhost:9002 instead of curl -d @- http://127.0.0.1:8383, as I couldn’t launch sphinx dashboard
You must use http://127.0.0.1:8383. 9002 is the port of the web server (for the web dashboard), 8383 is the port of the server that listens for json-rpc requests like the ones above.