Roadmap for my pick and place simulation project

asked 2019-03-27 04:01:29 -0600

Joel1394 gravatar image

updated 2019-03-27 05:21:50 -0600

Hello everyone, I am trying to implement the following simulation. I have been working my way into Ros, Linux and C++ the last few weeks, and want to get going, but still have some difficulties of how to best implement what I want.

The szenario is this: I get the pose and orientation of a small object which is detected by an AI (I do not code this part myself). Once I have received this information I want my UR5 to get the object pick it and place it (it will be sticked onto another object).

So far I got my UR5 running (used moveit) so I can plan and execute things in Rviz and they will be also executed in Gazebo. I think I need a Gazebo simulation. I still don't quite get the difference between Rviz and Gazebo, but as far as I understood, Gazebo is the proper environment for simulation since it respects e.g. physical restrictions, whereas Rviz doesn't...

So right now I can only move the UR5 by using plan and execute in Rviz and then the robot also moves in Gazebo. Do I actually need the Rviz window open or is there a way how I can just do things in gazebo only? I also tried to load my stl object which I want to pick and place into the scene, which worked fine in Rviz by importing file in the motionplanning section, but it didn't appear in the gazebo simulation. Seeing this makes me think even more: I don't really understand the relation between my Rviz and Gazebo simulators, obviously the robot movements are copied, but the environment isn't...

I guess I stop writing here and hope you could get a rough idea of what I am trying to do and would appreciate any help on this! Thank You!

Best regards Joel

Edit: image description

bjorn@bjorn-MacBookPro:~$ rostopic list
/arm_controller/command
/arm_controller/follow_joint_trajectory/cancel
/arm_controller/follow_joint_trajectory/feedback
/arm_controller/follow_joint_trajectory/goal
/arm_controller/follow_joint_trajectory/result
/arm_controller/follow_joint_trajectory/status
/arm_controller/state
/calibrated
/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/joint_states
/rosout
/rosout_agg
/tf
/tf_static
edit retag flag offensive close merge delete

Comments

I think this may not be a question that can be answered meaningfully, or at least I couldn't find the question. Could you clarify what you are asking?

If it helps, Rviz is purely for visualization, and Gazebo for physical simulation, as you wrote.

fvd gravatar imagefvd ( 2019-03-27 04:38:42 -0600 )edit

Can you rephrase your question to tell exactly what is your issue ?

About the Gazebo and Rviz confusion, they are two completly different things :

  • Rviz is just a visualization tool. It's just reading the different topics you are using to display them for a person. As an example, the map displayed in rviz are just a list of values, that's not readable at all. Same for the laser scans etc... Everything you are currently doing would be running exactly the same whether you use rviz or not.
  • Gazebo is a 3D simulator that will allow you to simulate your robot taking into account physics (gravity, friction etc..). It's the core of your simulation. And Moveit! will do some motion planning in order to send commands to Gazebo to move your robot.
Delb gravatar imageDelb ( 2019-03-27 04:46:11 -0600 )edit

Okay so the desired endresult is to run this simulation in gazebo. In the pictures I added above you can see my current robotmodel in gazebo and the rostopic list that comes with it.

Now what I don't know is how I can add the .stl file of my object which I want to pick and place in the simulation. And after that I want to write a code where the robot moves to the object, graps it and places it somewhere else. But I don't know how to do that in gazebo. All the moveit! tutorials only cover these actions in Rviz... But I don't see the point of why I would need Rviz if it is just for visualization but does not respect physics whereas gazebo visualizes and respects physics...

Joel1394 gravatar imageJoel1394 ( 2019-03-27 05:04:24 -0600 )edit

For RViz vs Gazebo: #q316396.

gvdhoorn gravatar imagegvdhoorn ( 2019-03-27 05:08:38 -0600 )edit
1

@Joel1394: please don't post screenshots of terminals. It's all text, so copy-paste it into your question. As-is, your question violates the support guidelines.

gvdhoorn gravatar imagegvdhoorn ( 2019-03-27 05:09:35 -0600 )edit