Get co-ordinates of mouse click in Gazebo
HI! I am using gazebo-9 with ros-melodic. I want to get the coordinates of mouse click on Gazebo GUI in a python Code.
Asked by MuneebAhmad on 2022-04-07 05:18:28 UTC
Answers
Hi, Is there a way to get the coordinates of a point (x and y coordinates) using the mouse on the gazebo client? Best, I want to be able to read in the cps tester coordinates of a mouse click - preferably using a service, but subscribing to a topic would do - into The position of x-coordinate of the mouse click is found by subtracting the event's x position with the bounding rectangle's x position. The x position of the event is found using the 'clientX' property. The x position of the canvas element, i.e. the left side of the rectangle can be found using the 'left' property.
Asked by Noradavis on 2022-05-14 03:28:49 UTC
Comments