how to use scripts for simulation of ur5 robotic arm in gazebo

asked 2021-09-09 02:18:25 -0500

umar_anjum gravatar image

updated 2022-03-05 17:53:25 -0500

lucasw gravatar image

Hi everyone, Hope you all are fine and doing great.

I am using Ubuntu 20.04 and ros noetic along with moveit controller. This is only simulation based project.

In the ur_gazebo at site I used it to start gazebo, controller and rviz simulation for a UR5 robotic arm. Now I am trying to change that simulation to do something else I have few questions:

  1. How to change the existing simulation.
  2. How to make my own simulation file or script for simulation.
  3. How can I add a camera and apply a script on it for object detection probably.

Thanks in advance.

edit retag flag offensive close merge delete


to do something else

Can you clarify what you want to achieve please ? Also explain what you've tried so far, why it isn't working etc...

Delb gravatar image Delb  ( 2021-09-13 07:00:51 -0500 )edit

I want to simulate ur5 arm to pick an object and place it at another place through using object detection applied to a camera attached with the arm via python script.

I want to add a camera for object detection to the simulation. That camera would use object detection for objects placed in front of it. then pick a specific object on my command, placing it at some defined place/bin

So far I am able to run ur5 simulation in gazebo and rviz also been able to start a controller as you can see here:

I want all of this to work in simulated environment, physical connection is not required. The object detection would be through a pyhton script, but I don't know where to use a pyhton script or how a script can even be attached with any simulation.

umar_anjum gravatar image umar_anjum  ( 2021-09-13 08:57:20 -0500 )edit

Sorry but I think you haven't enough knowledge in ROS to achieve what you want for the moment, I would recommend you to follow the basic ros tutorials first.

Just a few hints :

I don't know where to use a pyhton script or how a script can even be attached with any simulation

In ROS you write scripts (when using rospy) to create nodes, the nodes are executables that can interract with each others thanks to a ros master. The simulation you are talking about is a launch file where you declare all the nodes you want to use.

I want to add a camera

This will be done within the URDF file of your robot, where you define the model of your robot (shape, joints, sensors, etc...)

The object detection would be through a pyhton script

The object detection algorithm doesn't require to be a ros ...(more)

Delb gravatar image Delb  ( 2021-09-14 02:52:31 -0500 )edit

Thanks for the help I think I need more knowledge of about this first. Thanks again Delb

umar_anjum gravatar image umar_anjum  ( 2021-09-15 04:42:53 -0500 )edit