moveit / moveit_calibration

Hand-eye calibration tools for robot arms.
BSD 3-Clause "New" or "Revised" License
124 stars 70 forks source link

Simulation environment #13

Open JStech opened 3 years ago

JStech commented 3 years ago

A Gazebo simulation, with rendered images, would help for development and testing of this package. It'd also be helpful so we can provide a tutorial that doesn't depend on having hardware. I've started working on this, but I've not had a lot of time for it and I'm new to Gazebo, so it's slow going so far.

ros-gy commented 3 years ago

@JStech I've been attempting to follow the tutorial in a gazebo simulation, I can't get an output pose, and I've run into several crashes while trying. Can you clarify specifically why hardware is required, and what needs changed to make this package work in simulation? Thanks

JStech commented 3 years ago

I was able to run this in simulation, although I've not packaged it up and shared it. I used the simulation setup described in this tutorial, and created a target in Blender (a simple box textured with the target image). So hardware is not actually required, and I should update the tutorial to say hardware or a working Gazebo simulation is required. I'd planned to tidy things up but of course perfect is the enemy of done, so I should just throw it up somewhere.

What do you mean by "I can't get an output pose"? If you look at the target detection image, do the markers get outlined?

ros-gy commented 3 years ago

Thanks for the reply. I did the same, i added a textured box with a target image. Yes, I am getting markers outlined from target detection. After 5 samples, the FOV marker array shows. If i hit the "save camera pose" the RVIZ interface locks up and I don't get an output file. I will dig into this some more.

JStech commented 3 years ago

OK, I'll see if I can replicate this. Also, 5 poses is the bare minimum to calculate a calibration, but a few more will greatly improve it. I recommend doing ~12.

ros-gy commented 3 years ago

I just did 9 poses, and when I hit the button, it looked like a new window was in focus. If i hover over the "RVIZ" icon, and empty window shows "Save camera pose" window. If i close this, then I get RVIZ back. But there is no visual window for me to see options. Should there be a popup window when I hit "Save camera pose?" image

JStech commented 3 years ago

Yes, there should be. That's a bug I've run into before but hadn't had the chance to chase down until now. I think this fixes it, #24. Could you pull that branch and give it a try?

JStech commented 3 years ago

Here is my quick-and-dirty simulation setup: https://github.com/JStech/moveit_cal_simulation

ros-gy commented 3 years ago

Yes, there should be. That's a bug I've run into before but hadn't had the chance to chase down until now. I think this fixes it, #24. Could you pull that branch and give it a try?

Yes, PR 24 fixed it, I can now save the camera pose! Thank you.

Also, thank you for posting the simulation, I will take a look soon.