Painting the robot's trace
Painting the robot's trace
I'm using ZeroMQ, C++ and CoppeliaSim 4.5.1 in Linux. I would like to draw the robot's path (i.e. the base's position and the end-effector's position of the arm). I need to send the actual data from my client since it has the controller. I'm looking for the most efficient way to do it. I just need some points to be drawn on the scene (i.e. not fancy painting). How can I do so? I'm running the simulation in the stepping mode.
Re: Painting the robot's trace
With drawing objects.
E.g.:
E.g.:
Code: Select all
dwo = sim.addDrawingObject(sim.drawing_linestrip, 5, 0, -1, 1000, {1,0,0})
for i = 0, 100 do
local x = math.cos(math.pi * 2 * i / 100)
local y = math.sin(math.pi * 4 * i / 100)
local z = 0.005
sim.addDrawingObjectItem(dwo, {x, y, z})
end