Git Product home page Git Product logo

ur5-pick-and-place-simulation's Introduction

UR5 Pick and Place Simulation in Ros/Gazebo


Table of contents

Description

This repository demonstrates UR5 pick-and-place in ROS and Gazebo. The UR5 uses a Xbox Kinect cam to detect eleven types of Lego Bricks, and publish its position and angolation.

The goals of this project are:

  • simulate the iteration of a UR5 robot with Lego bricks
  • The robotic arm must be able to move a block from position A to B and construct a castle by assembling different bricks

Folder

UR5-Pick-and-Place-Simulation/catkin_ws/
├── levelManager
├── vision
├── motion_planning
├── gazebo_ros_link_attacher
├── robot
  • levelManager: the task of this package is to launch the world and spawn the different bricks
  • vision: the task of this package is to recognize the object type and orientation of the bricks
  • motion_planning: the task is to move the robot and pick and place the lego
  • gazebo_ros_link_attacher: A gazebo plugin definable from URDF to inform a client of a collision with an object
  • robot: the task is to define the robot model with appropriate PID settings

Requirements

For running each sample code:

Setup

After installing the libraries needed to run the project. Clone this repo:

git clone https://github.com/pietrolechthaler/UR5-Pick-and-Place-Simulation/

Setup the project:

cd UR5-Pick-and-Place-Simulation/catkin_ws
source /opt/ros/noetic/setup.bash
catkin build
source devel/setup.bash
echo "source $PWD/devel/setup.bash" >> $HOME/.bashrc

Clone and install YoloV5:

cd ~
git clone https://github.com/ultralytics/yolov5
cd yolov5
pip3 install -r requirements.txt

Usage

Launch the world

roslaunch levelManager lego_world.launch

Choose the level (from 1 to 4):

rosrun levelManager levelManager.py -l [level]

Start the kinematics process

rosrun motion_planning motion_planning.py

Start the localization process

rosrun vision vision.py -show
  • -show : show the results of the recognition and localization process with an image

Contributors

Name Github
Davice Cerpelloni https://github.com/davidecerpelloni
Leonardo Collizzolli https://github.com/leocolliz
Pietro Lechthaler https://github.com/pietrolechthaler
Stefano Rizzi https://github.com/StefanoRizzi

ur5-pick-and-place-simulation's People

Contributors

pietrolechthaler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ur5-pick-and-place-simulation's Issues

Objects slips from gripper during Gazebo simulation / How to use gazebo_ros_link_attacher ?

Hey@pietrolechthaler
I'm trying to simulate a simple scenario of pick and place for my UR5 ARM robot but i'm encoutering some problems during grasp. In particular, when grasping the gripper starts shaking untill the object slips out of the gripper the gripper seems to explode as can be seen in Video I am using effort_controllers. Please help me to solve the issue or please let me known how can I use gazebo_ros_link_attacher in my project

 </gazebo>
    <!--using the grasp plugin so that the gripper can grasp things in simulation-->
    <gazebo>
        <plugin name="gazebo_grasp_fix" filename="libgazebo_grasp_fix.so">
            <arm>
                <arm_name>ur5</arm_name>
                <palm_link>wrist_3_link</palm_link>
                <gripper_link>gripper_finger1_finger_tip_link</gripper_link>
                <gripper_link>gripper_finger2_finger_tip_link</gripper_link>
                <gripper_link>gripper_finger1_inner_knuckle_link</gripper_link>
                <gripper_link>gripper_finger2_inner_knuckle_link</gripper_link>
                <gripper_link>gripper_finger1_knuckle_link</gripper_link>
                <gripper_link>gripper_finger2_knuckle_link</gripper_link>
            </arm>
            <forces_angle_tolerance>100</forces_angle_tolerance>
            <update_rate>10</update_rate>
            <grip_count_threshold>4</grip_count_threshold>
            <max_grip_count>8</max_grip_count>
            <release_tolerance>0.005</release_tolerance>
            <disable_collisions_on_attach>false</disable_collisions_on_attach>
            <contact_topic>__default_topic__</contact_topic>
        </plugin>
    </gazebo>

error advertising servic

i can't solve this problem..

Node::Advertise(): Error advertising service [/X1-Y1-Z2_1/shininess]. Did you forget to start the discovery service?
Node::Advertise(): Error advertising service [/X1-Y2-Z1_1/shininess]. Did you forget to start the discovery service?
Node::Advertise(): Error advertising service [/X1-Y2-Z2_1/shininess]. Did you forget to start the discovery service?
Node::Advertise(): Error advertising service [/X1-Y2-Z2-CHAMFER_1/shininess]. Did you forget to start the discovery service?
Node::Advertise(): Error advertising service [/X1-Y2-Z2-TWINFILLET_1/shininess]. Did you forget to start the discovery service?
Node::Advertise(): Error advertising service [/X1-Y3-Z2_1/shininess]. Did you forget to start the discovery service?
Node::Advertise(): Error advertising service [/X1-Y3-Z2-FILLET_1/shininess]. Did you forget to start the discovery service?
Node::Advertise(): Error advertising service [/X1-Y4-Z1_1/shininess]. Did you forget to start the discovery service?
Node::Advertise(): Error advertising service [/X1-Y4-Z2_1/shininess]. Did you forget to start the discovery service?
Node::Advertise(): Error advertising service [/X2-Y2-Z2_1/shininess]. Did you forget to start the discovery service?
Node::Advertise(): Error advertising service [/X2-Y2-Z2-FILLET_1/shininess]. Did you forget to start the discovery service?

[ERROR]: DeleteModel: model [X1-Y1-Z2_1] does not exist

Hello, I got several errors like "DeleteModel: model [......] does not exist". The feedback was like this:

PARAMETERS

  • /gazebo/enable_ros_network: True
  • /gazebo_ros_control/pid_gains/elbow_joint/d: 50.0
  • /gazebo_ros_control/pid_gains/elbow_joint/i: 10
  • /gazebo_ros_control/pid_gains/elbow_joint/i_clamp: 100
  • /gazebo_ros_control/pid_gains/elbow_joint/p: 10000
  • /gazebo_ros_control/pid_gains/robotiq_85_left_knuckle_joint/p: 100.0
  • /gazebo_ros_control/pid_gains/shoulder_lift_joint/d: 100.0
  • /gazebo_ros_control/pid_gains/shoulder_lift_joint/i: 10
  • /gazebo_ros_control/pid_gains/shoulder_lift_joint/i_clamp: 100
  • /gazebo_ros_control/pid_gains/shoulder_lift_joint/p: 10000
  • /gazebo_ros_control/pid_gains/shoulder_pan_joint/d: 100.0
  • /gazebo_ros_control/pid_gains/shoulder_pan_joint/i: 0.2
  • /gazebo_ros_control/pid_gains/shoulder_pan_joint/i_clamp: 10
  • /gazebo_ros_control/pid_gains/shoulder_pan_joint/p: 2500.0
  • /gazebo_ros_control/pid_gains/wrist_1_joint/d: 25.0
  • /gazebo_ros_control/pid_gains/wrist_1_joint/i: 0.2
  • /gazebo_ros_control/pid_gains/wrist_1_joint/i_clamp: 0
  • /gazebo_ros_control/pid_gains/wrist_1_joint/p: 1000.0
  • /gazebo_ros_control/pid_gains/wrist_2_joint/d: 25.0
  • /gazebo_ros_control/pid_gains/wrist_2_joint/i: 0.7
  • /gazebo_ros_control/pid_gains/wrist_2_joint/i_clamp: 5
  • /gazebo_ros_control/pid_gains/wrist_2_joint/p: 1000.0
  • /gazebo_ros_control/pid_gains/wrist_3_joint/d: 25.5
  • /gazebo_ros_control/pid_gains/wrist_3_joint/i: 0.7
  • /gazebo_ros_control/pid_gains/wrist_3_joint/i_clamp: 5
  • /gazebo_ros_control/pid_gains/wrist_3_joint/p: 1000.0
  • /gripper_controller/action_monitor_rate: 20
  • /gripper_controller/gains/robotiq_85_left_knuckle_joint/d: 0.1
  • /gripper_controller/gains/robotiq_85_left_knuckle_joint/i: 0
  • /gripper_controller/gains/robotiq_85_left_knuckle_joint/i_clamp: 0
  • /gripper_controller/gains/robotiq_85_left_knuckle_joint/p: 4
  • /gripper_controller/goal_tolerance: 0.002
  • /gripper_controller/joint: robotiq_85_left_k...
  • /gripper_controller/max_effort: 100
  • /gripper_controller/stall_timeout: 1.0
  • /gripper_controller/stall_velocity_threshold: 0.001
  • /gripper_controller/type: effort_controller...
  • /joint_state_controller/publish_rate: 125
  • /joint_state_controller/type: joint_state_contr...
  • /robot_description: <?xml version="1....
  • /robot_state_publisher/publish_frequency: 50.0
  • /rosdistro: noetic
  • /rosversion: 1.16.0
  • /trajectory_controller/action_monitor_rate: 10
  • /trajectory_controller/constraints/elbow_joint/goal: 0.1
  • /trajectory_controller/constraints/elbow_joint/trajectory: 0.1
  • /trajectory_controller/constraints/goal_time: 0.6
  • /trajectory_controller/constraints/shoulder_lift_joint/goal: 0.1
  • /trajectory_controller/constraints/shoulder_lift_joint/trajectory: 0.1
  • /trajectory_controller/constraints/shoulder_pan_joint/goal: 0.1
  • /trajectory_controller/constraints/shoulder_pan_joint/trajectory: 0.1
  • /trajectory_controller/constraints/stopped_velocity_tolerance: 0.05
  • /trajectory_controller/constraints/wrist_1_joint/goal: 0.1
  • /trajectory_controller/constraints/wrist_1_joint/trajectory: 0.1
  • /trajectory_controller/constraints/wrist_2_joint/goal: 0.1
  • /trajectory_controller/constraints/wrist_2_joint/trajectory: 0.1
  • /trajectory_controller/constraints/wrist_3_joint/goal: 0.1
  • /trajectory_controller/constraints/wrist_3_joint/trajectory: 0.1
  • /trajectory_controller/joints: ['shoulder_pan_jo...
  • /trajectory_controller/state_publish_rate: 25
  • /trajectory_controller/stop_trajectory_duration: 0.5
  • /trajectory_controller/type: position_controll...
  • /use_sim_time: True

NODES
/
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
levelManager (levelManager/levelManager.py)
robot_controllers (controller_manager/spawner)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
spawn_gazebo_model (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [40240]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 0df3ab5a-2989-11ef-8661-21bf0179b47c
WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
process[rosout-1]: started with pid [40261]
started core service [/rosout]
process[gazebo-2]: started with pid [40268]
process[gazebo_gui-3]: started with pid [40273]
process[spawn_gazebo_model-4]: started with pid [40278]
process[robot_controllers-5]: started with pid [40279]
process[robot_state_publisher-6]: started with pid [40280]
process[levelManager-7]: started with pid [40281]
[ WARN] [1718285409.940103438]: link 'robotiq_coupler' material 'flat_black' undefined.
[ WARN] [1718285409.940638207]: link 'robotiq_coupler' material 'flat_black' undefined.
WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
Waining gazebo service..
[INFO] [1718285410.255749, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1718285410.259179, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1718285410.268978430]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1718285410.269540019]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1718285410.310159469]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1718285410.310816769]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
[ERROR] [1718285410.857407413]: DeleteModel: model [X1-Y1-Z2_1] does not exist
[ERROR] [1718285410.858331118]: DeleteModel: model [X1-Y2-Z1_1] does not exist
[ERROR] [1718285410.859073138]: DeleteModel: model [X1-Y2-Z2_1] does not exist
[ INFO] [1718285410.859237467]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ERROR] [1718285410.859865716]: DeleteModel: model [X1-Y2-Z2-CHAMFER_1] does not exist
[ERROR] [1718285410.860703275]: DeleteModel: model [X1-Y2-Z2-TWINFILLET_1] does not exist
[ERROR] [1718285410.861586199]: DeleteModel: model [X1-Y3-Z2_1] does not exist
[INFO] [1718285410.862440, 0.000000]: Calling service /gazebo/spawn_urdf_model
[ERROR] [1718285410.862830132]: DeleteModel: model [X1-Y3-Z2-FILLET_1] does not exist
[ERROR] [1718285410.864892391]: DeleteModel: model [X1-Y4-Z1_1] does not exist
[ INFO] [1718285412.802787410]: SetStatic service at: /link_attacher_node/setstatic
[ INFO] [1718285412.803449601]: Attach service at: /link_attacher_node/attach
[ INFO] [1718285412.803729601]: Detach service at: /link_attacher_node/detach
[ INFO] [1718285412.803757448]: Link attacher node initialized.
[ERROR] [1718285412.881853076]: DeleteModel: model [X1-Y4-Z2_1] does not exist
[INFO] [1718285412.881995, 0.000000]: Spawn status: SpawnModel: Successfully spawned entity
[INFO] [1718285412.882983, 0.000000]: Waiting for service /gazebo/set_model_configuration
[ERROR] [1718285412.884010473]: DeleteModel: model [X2-Y2-Z2_1] does not exist
[INFO] [1718285412.884801, 0.000000]: temporary hack to fix the -J joint position option (issue #93), sleeping for 1 second to avoid race condition.
[ERROR] [1718285412.885527559]: DeleteModel: model [X2-Y2-Z2-FILLET_1] does not exist
[ INFO] [1718285412.886724504]: Physics dynamic reconfigure ready.
[ INFO] [1718285412.957291885]: Loading gazebo_ros_control plugin
[ INFO] [1718285412.957358293]: Starting gazebo_ros_control plugin in namespace: /
[ INFO] [1718285412.957967351]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server.
[ WARN] [1718285413.069146014]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'shoulder_pan_joint'.
[ WARN] [1718285413.075609275]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'shoulder_lift_joint'.
[ WARN] [1718285413.081328306]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'elbow_joint'.
[ WARN] [1718285413.086929827]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'wrist_1_joint'.
[ WARN] [1718285413.092324222]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'wrist_2_joint'.
[ WARN] [1718285413.098104175]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'wrist_3_joint'.
[ INFO] [1718285413.105645071]: Loaded gazebo_ros_control.
[ INFO] [1718285413.120592435]: ft_sensor plugin reporting wrench values to the frame [wrist_3_link]
[Error]: select level from 1 to 4
All done. Ready to start.
[levelManager-7] process has finished cleanly
log file: /home/xxx/.ros/log/0df3ab5a-2989-11ef-8661-21bf0179b47c/levelManager-7*.log
[INFO] [1718285413.886536, 0.000000]: Calling service /gazebo/set_model_configuration
[INFO] [1718285413.888390, 0.000000]: Set model configuration status: SetModelConfiguration: success
[spawn_gazebo_model-4] process has finished cleanly
log file: /home/xxx/.ros/log/0df3ab5a-2989-11ef-8661-21bf0179b47c/spawn_gazebo_model-4*.log

Does this matter? Because I can't receive any image now, the robot is unable to pick and place bricks, I don't know whether they are related.

launch failed!

Hi, I met a problem like follows:
`roslaunch levelManager lego_world.launch
WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
... logging to /home/one/.ros/log/50b15b34-5e80-11ed-b156-b556b4c50817/roslaunch-wan-5574.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://wan:36055/

SUMMARY

PARAMETERS

  • /gazebo/enable_ros_network: True
  • /gazebo_ros_control/pid_gains/elbow_joint/d: 50.0
  • /gazebo_ros_control/pid_gains/elbow_joint/i: 10
  • /gazebo_ros_control/pid_gains/elbow_joint/i_clamp: 100
  • /gazebo_ros_control/pid_gains/elbow_joint/p: 10000
  • /gazebo_ros_control/pid_gains/robotiq_85_left_knuckle_joint/p: 100.0
  • /gazebo_ros_control/pid_gains/shoulder_lift_joint/d: 100.0
  • /gazebo_ros_control/pid_gains/shoulder_lift_joint/i: 10
  • /gazebo_ros_control/pid_gains/shoulder_lift_joint/i_clamp: 100
  • /gazebo_ros_control/pid_gains/shoulder_lift_joint/p: 10000
  • /gazebo_ros_control/pid_gains/shoulder_pan_joint/d: 100.0
  • /gazebo_ros_control/pid_gains/shoulder_pan_joint/i: 0.2
  • /gazebo_ros_control/pid_gains/shoulder_pan_joint/i_clamp: 10
  • /gazebo_ros_control/pid_gains/shoulder_pan_joint/p: 2500.0
  • /gazebo_ros_control/pid_gains/wrist_1_joint/d: 25.0
  • /gazebo_ros_control/pid_gains/wrist_1_joint/i: 0.2
  • /gazebo_ros_control/pid_gains/wrist_1_joint/i_clamp: 0
  • /gazebo_ros_control/pid_gains/wrist_1_joint/p: 1000.0
  • /gazebo_ros_control/pid_gains/wrist_2_joint/d: 25.0
  • /gazebo_ros_control/pid_gains/wrist_2_joint/i: 0.7
  • /gazebo_ros_control/pid_gains/wrist_2_joint/i_clamp: 5
  • /gazebo_ros_control/pid_gains/wrist_2_joint/p: 1000.0
  • /gazebo_ros_control/pid_gains/wrist_3_joint/d: 25.5
  • /gazebo_ros_control/pid_gains/wrist_3_joint/i: 0.7
  • /gazebo_ros_control/pid_gains/wrist_3_joint/i_clamp: 5
  • /gazebo_ros_control/pid_gains/wrist_3_joint/p: 1000.0
  • /gripper_controller/action_monitor_rate: 20
  • /gripper_controller/gains/robotiq_85_left_knuckle_joint/d: 0.1
  • /gripper_controller/gains/robotiq_85_left_knuckle_joint/i: 0
  • /gripper_controller/gains/robotiq_85_left_knuckle_joint/i_clamp: 0
  • /gripper_controller/gains/robotiq_85_left_knuckle_joint/p: 4
  • /gripper_controller/goal_tolerance: 0.002
  • /gripper_controller/joint: robotiq_85_left_k...
  • /gripper_controller/max_effort: 100
  • /gripper_controller/stall_timeout: 1.0
  • /gripper_controller/stall_velocity_threshold: 0.001
  • /gripper_controller/type: effort_controller...
  • /joint_state_controller/publish_rate: 125
  • /joint_state_controller/type: joint_state_contr...
  • /robot_description: <?xml version="1....
  • /robot_state_publisher/publish_frequency: 50.0
  • /rosdistro: noetic
  • /rosversion: 1.15.14
  • /trajectory_controller/action_monitor_rate: 10
  • /trajectory_controller/constraints/elbow_joint/goal: 0.1
  • /trajectory_controller/constraints/elbow_joint/trajectory: 0.1
  • /trajectory_controller/constraints/goal_time: 0.6
  • /trajectory_controller/constraints/shoulder_lift_joint/goal: 0.1
  • /trajectory_controller/constraints/shoulder_lift_joint/trajectory: 0.1
  • /trajectory_controller/constraints/shoulder_pan_joint/goal: 0.1
  • /trajectory_controller/constraints/shoulder_pan_joint/trajectory: 0.1
  • /trajectory_controller/constraints/stopped_velocity_tolerance: 0.05
  • /trajectory_controller/constraints/wrist_1_joint/goal: 0.1
  • /trajectory_controller/constraints/wrist_1_joint/trajectory: 0.1
  • /trajectory_controller/constraints/wrist_2_joint/goal: 0.1
  • /trajectory_controller/constraints/wrist_2_joint/trajectory: 0.1
  • /trajectory_controller/constraints/wrist_3_joint/goal: 0.1
  • /trajectory_controller/constraints/wrist_3_joint/trajectory: 0.1
  • /trajectory_controller/joints: ['shoulder_pan_jo...
  • /trajectory_controller/state_publish_rate: 25
  • /trajectory_controller/stop_trajectory_duration: 0.5
  • /trajectory_controller/type: position_controll...
  • /use_sim_time: True

NODES
/
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
levelManager (levelManager/levelManager.py)
robot_controllers (controller_manager/spawner)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
spawn_gazebo_model (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [5598]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 50b15b34-5e80-11ed-b156-b556b4c50817
WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
process[rosout-1]: started with pid [5615]
started core service [/rosout]
process[gazebo-2]: started with pid [5622]
process[gazebo_gui-3]: started with pid [5627]
process[spawn_gazebo_model-4]: started with pid [5632]
process[robot_controllers-5]: started with pid [5633]
process[robot_state_publisher-6]: started with pid [5634]
process[levelManager-7]: started with pid [5635]
[ WARN] [1667814073.099875444]: link 'robotiq_coupler' material 'flat_black' undefined.
[ WARN] [1667814073.100885810]: link 'robotiq_coupler' material 'flat_black' undefined.
WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "levelManager" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "robotName_description" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
[INFO] [1667814073.558426, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1667814073.566681, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
Waining gazebo service..
[ INFO] [1667814073.703495112]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1667814073.704510189]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1667814073.790957198]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1667814073.791926504]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
[ INFO] [1667814074.319198086]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1667814074.340283428]: Physics dynamic reconfigure ready.
[INFO] [1667814074.471848, 0.000000]: Calling service /gazebo/spawn_urdf_model
[ INFO] [1667814075.256219446]: Camera Plugin: The 'robotNamespace' param did not exit
[ INFO] [1667814075.258502455]: Camera Plugin (ns = ) <tf_prefix_>, set to ""
[ INFO] [1667814075.269495430]: SetStatic service at: /link_attacher_node/setstatic
[ INFO] [1667814075.270917791]: Attach service at: /link_attacher_node/attach
[ INFO] [1667814075.271429790]: Detach service at: /link_attacher_node/detach
[ INFO] [1667814075.271472985]: Link attacher node initialized.
[INFO] [1667814075.455326, 0.000000]: Spawn status: SpawnModel: Successfully spawned entity
[ERROR] [1667814075.455781567]: DeleteModel: model [X1-Y1-Z2_1] does not exist
[INFO] [1667814075.456753, 0.000000]: Waiting for service /gazebo/set_model_configuration
[ERROR] [1667814075.458058682]: DeleteModel: model [X1-Y2-Z1_1] does not exist
[INFO] [1667814075.459632, 0.000000]: temporary hack to fix the -J joint position option (issue #93), sleeping for 1 second to avoid race condition.
[ERROR] [1667814075.471374971]: DeleteModel: model [X1-Y2-Z2_1] does not exist
[ERROR] [1667814075.473742902]: DeleteModel: model [X1-Y2-Z2-CHAMFER_1] does not exist
[ERROR] [1667814075.475736050]: DeleteModel: model [X1-Y2-Z2-TWINFILLET_1] does not exist
[ERROR] [1667814075.478212906]: DeleteModel: model [X1-Y3-Z2_1] does not exist
[ERROR] [1667814075.480136120]: DeleteModel: model [X1-Y3-Z2-FILLET_1] does not exist
[ERROR] [1667814075.482023852]: DeleteModel: model [X1-Y4-Z1_1] does not exist
[ERROR] [1667814075.483716889]: DeleteModel: model [X1-Y4-Z2_1] does not exist
[ERROR] [1667814075.485569330]: DeleteModel: model [X2-Y2-Z2_1] does not exist
[ERROR] [1667814075.488242921]: DeleteModel: model [X2-Y2-Z2-FILLET_1] does not exist
[ INFO] [1667814075.614511046]: Loading gazebo_ros_control plugin
[ INFO] [1667814075.614626846]: Starting gazebo_ros_control plugin in namespace: /
[ INFO] [1667814075.615539848]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server.
[ WARN] [1667814075.733096421]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'shoulder_pan_joint'.
[ WARN] [1667814075.745633882]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'shoulder_lift_joint'.
[ WARN] [1667814075.757633154]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'elbow_joint'.
[ WARN] [1667814075.770235688]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'wrist_1_joint'.
[ WARN] [1667814075.782024807]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'wrist_2_joint'.
[ WARN] [1667814075.793172284]: Deprecated syntax, please prepend 'hardware_interface/' to 'PositionJointInterface' within the tag in joint 'wrist_3_joint'.
[ INFO] [1667814075.809105378]: Loaded gazebo_ros_control.
[ INFO] [1667814075.821190622]: ft_sensor plugin reporting wrench values to the frame [wrist_3_link]
[ERROR] [1667814076.011753785]: Could not load controller 'gripper_controller' because controller type 'effort_controllers/GripperActionController' does not exist.
[ERROR] [1667814076.011798092]: Use 'rosservice call controller_manager/list_controller_types' to get the available types
[Error]: select level from 1 to 4

All done. Ready to start.
[levelManager-7] process has finished cleanly
log file: /home/one/.ros/log/50b15b34-5e80-11ed-b156-b556b4c50817/levelManager-7*.log
[INFO] [1667814076.461432, 0.000000]: Calling service /gazebo/set_model_configuration
[INFO] [1667814076.464250, 0.000000]: Set model configuration status: SetModelConfiguration: success
[ERROR] [1667814077.012107, 0.000000]: Failed to load gripper_controller
[spawn_gazebo_model-4] process has finished cleanly
log file: /home/one/.ros/log/50b15b34-5e80-11ed-b156-b556b4c50817/spawn_gazebo_model-4*.log

`

Vision file changed and not working

the last command for the vision folder doesn't exist as mentioned, and using the command
rosrun vision lego-vision.py -show

gives the following error:

Traceback (most recent call last):
  File "/home/aryan/.local/lib/python3.8/site-packages/torch/__init__.py", line 172, in _load_global_deps
    ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
  File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/aryan/.local/lib/python3.8/site-packages/torch/lib/../../nvidia/cublas/lib/libcublas.so.11: file too short

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/aryan/UR5-Pick-and-Place-Simulation/catkin_ws/src/vision/scripts/lego-vision.py", line 5, in <module>
    import torch
  File "/home/aryan/.local/lib/python3.8/site-packages/torch/__init__.py", line 217, in <module>
    _load_global_deps()
  File "/home/aryan/.local/lib/python3.8/site-packages/torch/__init__.py", line 178, in _load_global_deps
    _preload_cuda_deps()
  File "/home/aryan/.local/lib/python3.8/site-packages/torch/__init__.py", line 158, in _preload_cuda_deps
    ctypes.CDLL(cublas_path)
  File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/aryan/.local/lib/python3.8/site-packages/nvidia/cublas/lib/libcublas.so.11: file too short

I don't really know how to fix it, I'm using a VM for Ubuntu 20.04 and ROS Noetic.

spawn lego bricks on the same position more than once, the robot can not work !

Hi, pietrolechthaler.
I have a new problem, instead to spawn lego random, i fixed the spawn position. for the first time run the following code:
rosrun levelManager levelManager.py -l 1
rosrun motion_planning motion_planning.py

the robot can work well.

for the second time, not reboot the gazebo env, i run the same command,
the robot can not work well, the terminal shown that
X1-Y2-Z1_1 TO HOME
[WARN] [1668246368.632644, 295.206000]: Timeout waiting for position
[WARN] [1668246371.880908, 298.445000]: Timeout waiting for position
Moving to Default Position
[WARN] [1668246374.971821, 301.529000]: Timeout waiting for position

so any help will be grateful!

It seems that the camera does not receieve any image.

There is not a camera view in my gazebo. The vision algorithm seems to not work as the terminal shows it is waiting for images. So the motion_planning does not work either, since it is waiting for the object detection results.

How to solve it? Thanks!

2024-05-11 17-58-09 的屏幕截图

pyquaternion exists but can not be found.

Everything seems ok until I run rosrun motion_planning motion_planning.py. The error is as follows:

(tamp) xj@xj:~$ rosrun motion_planning motion_planning.py
Traceback (most recent call last):
File "/home/xj/catkin_ws/src/motion_planning/scripts/motion_planning.py", line 9, in
from controller import ArmController
File "/home/xj/catkin_ws/src/motion_planning/scripts/controller.py", line 8, in
from pyquaternion import Quaternion
ModuleNotFoundError: No module named 'pyquaternion

Then I install the unfound package, but actually it's already installed:

(tamp) xj@xj:~$ pip install pyquaternion
Requirement already satisfied: pyquaternion in ./anaconda3/envs/tamp/lib/python3.9/site-packages (0.9.9)
Requirement already satisfied: numpy in ./anaconda3/envs/tamp/lib/python3.9/site-packages (from pyquaternion) (1.26.4)

I also test it in python, this package can be imported.

(tamp) xj@xj:~$ python
Python 3.9.19 (main, Mar 21 2024, 17:11:28)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
import pyquaternion
from pyquaternion import Quaternion

Now I'm confused about why this happen and how to solve it.
Thank you very much.

Cannot pick and pleace

My terminal would generate some random errors then the robotic arm stuck in the gazebo when I am running the control.py.
[ERROR] [1706798258.559584, 102.611000]: Got a transition callback on a goal handle that we're not tracking
Lego is facing (0, 0, 1)
Angle of approaching measures 0.48 deg
Moving model X1-Y4-Z1 to 0.589908 -0.501033 0.8000000012516976
[WARN] [1706797628.885092, 2241.606000]: Timeout waiting for position
[WARN] [1706797638.389484, 2244.802000]: Timeout waiting for position
X1-Y4-Z1_1 TO HOME
[WARN] [1706797650.118280, 2249.204000]: Timeout waiting for position
Lego is facing (0, 0, 1)
Angle of approaching measures -1.50 deg
[WARN] [1706797661.394125, 2253.524000]: Timeout waiting for position
[WARN] [1706797669.668811, 2256.762000]: Timeout waiting for position
[WARN] [1706797677.802954, 2260.524000]: Timeout waiting for position
Moving model X1-Y2-Z2-CHAMFER to 0.592619 -0.293903 0.8095000018775463
[WARN] [1706797685.865533, 2263.847000]: Timeout waiting for position
[WARN] [1706797693.666649, 2267.045000]: Timeout waiting for position
X1-Y2-Z2-CHAMFER_1 TO HOME
[WARN] [1706797703.412635, 2271.445000]: Timeout waiting for position
[WARN] [1706797710.066887, 2275.127000]: Timeout waiting for position
Lego is facing (0, 0, 1)
Angle of approaching measures -0.61 deg
[WARN] [1706797717.959270, 2279.365000]: Timeout waiting for position
[WARN] [1706797724.452495, 2282.688000]: Timeout waiting for position
[WARN] [1706797730.603448, 2286.408000]: Timeout waiting for position
Moving model X2-Y2-Z2-FILLET to 0.442505 -0.727271 0.8095000018775463
[WARN] [1706797736.736042, 2290.408000]: Timeout waiting for position
[WARN] [1706797741.541087, 2293.644000]: Timeout waiting for position
X2-Y2-Z2-FILLET_1 TO HOME
[WARN] [1706797748.407899, 2298.085000]: Timeout waiting for position

Anyone have any ideas to solve this problem? seems some issue related to the robotic arm control.
Thanks a lot!!!!

Vision file searching for images infinite glitch

i tried running the given files but the vision file is just stuck in the prompt searching for images infinitely please provide solution to fix. Also is this simulation tested on ros noetic or kinetic

Motion planning controller issue

So I am trying to do this, and the gazebo starts fine, but then when I start the motion_planning.py script, it just stays at Initializing node of kinematics, and i stayed like that 10 minutes or so, and then when i close, it throws this.

Traceback (most recent call last):
File "motion_planning.py", line 346, in
controller = ArmController()
File "/home/odin/UR5-Pick-and-Place-Simulation/catkin_ws/src/motion_planning/scripts/controller.py", line 34, in init
joint_states = get_controller_state(controller_topic).actual.positions
File "/home/odin/UR5-Pick-and-Place-Simulation/catkin_ws/src/motion_planning/scripts/controller.py", line 12, in get_controller_state
return rospy.wait_for_message(
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/client.py", line 428, in wait_for_message
raise rospy.exceptions.ROSInterruptException("rospy shutdown")
rospy.exceptions.ROSInterruptException: rospy shutdown

I tried pressing play on gazebo, tried commenting the line with the ArmController(), but then it just stays at Initializing gripper controller.

Vision and motion planning issue

Hello!

I know it's hard to exactly trouble shoot my issues.. but in case..
I can run scripts but firstly when I can go to motion planning.py . The script stopped to run till 'the detection of the model'. And I started the go through the codes.
And now, the vision scripts can not run till '(waiting for the image)'. I think the cv part may have some issues during my running.
If any help and comments can be provided, Thank you very much!

Best regards,
Zion

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.