diff --git a/rrrobot_ws/src/rrrobot/config/rrrobot.yaml b/rrrobot_ws/src/rrrobot/config/rrrobot.yaml index 242144e..42bf8ef 100644 --- a/rrrobot_ws/src/rrrobot/config/rrrobot.yaml +++ b/rrrobot_ws/src/rrrobot/config/rrrobot.yaml @@ -79,32 +79,32 @@ random_seed: 1 # Seed for the pseudo random number generat # - piston_rod_part_57 # The piston rod part in the bins with randomized ID of 57 # - piston_rod_part_45 -# Models to be inserted in the bins -models_over_bins: - bin1: # Name of the bin (bin1-bin6, as named in the environment simulation) - models: # List of models to insert - # gear_part: # Type of model to insert - # xyz_start: [0.1, 0.1, 0] # Origin of the first model to insert - # xyz_end: [0.5, 0.5, 0] # Origin of the last model to insert - # rpy: [0, 0, 'pi/4'] # Orientation of all models to insert - # num_models_x: 3 # How many models to insert along the x dimension - # num_models_y: 5 # How many models to insert along the y dimension - # bin5: - # models: - # gasket_part: - # xyz_start: [0.1, 0.1, 0.0] - # xyz_end: [0.5, 0.5, 0.0] - # rpy: [0, 0, 'pi/4'] - # num_models_x: 2 - # num_models_y: 3 - # bin6: - # models: - # piston_rod_part: - # xyz_start: [0.1, 0.1, 0.0] - # xyz_end: [0.5, 0.5, 0.0] - # rpy: [0, 0, 'pi/4'] - # num_models_x: 3 - # num_models_y: 3 +# # Models to be inserted in the bins +# models_over_bins: +# bin1: # Name of the bin (bin1-bin6, as named in the environment simulation) +# models: # List of models to insert +# gear_part: # Type of model to insert +# xyz_start: [0.1, 0.1, 0] # Origin of the first model to insert +# xyz_end: [0.5, 0.5, 0] # Origin of the last model to insert +# rpy: [0, 0, 'pi/4'] # Orientation of all models to insert +# num_models_x: 3 # How many models to insert along the x dimension +# num_models_y: 5 # How many models to insert along the y dimension +# bin5: +# models: +# gasket_part: +# xyz_start: [0.1, 0.1, 0.0] +# xyz_end: [0.5, 0.5, 0.0] +# rpy: [0, 0, 'pi/4'] +# num_models_x: 2 +# num_models_y: 3 +# bin6: +# models: +# piston_rod_part: +# xyz_start: [0.1, 0.1, 0.0] +# xyz_end: [0.5, 0.5, 0.0] +# rpy: [0, 0, 'pi/4'] +# num_models_x: 3 +# num_models_y: 3 # # Models to be spawned in particular reference frames # models_to_spawn: diff --git a/rrrobot_ws/src/rrrobot/config/rrrobot_sensors.yaml b/rrrobot_ws/src/rrrobot/config/rrrobot_sensors.yaml index 33de276..d3976e9 100644 --- a/rrrobot_ws/src/rrrobot/config/rrrobot_sensors.yaml +++ b/rrrobot_ws/src/rrrobot/config/rrrobot_sensors.yaml @@ -1,36 +1,11 @@ sensors: - break_beam_1: - type: break_beam - pose: - xyz: [1.6, 2.25, 0.91] - rpy: [0, 0, 'pi'] - proximity_sensor_1: - type: proximity_sensor - pose: - xyz: [0.95, 2.6, 0.92] - rpy: [0, 0, 0] logical_camera_1: type: logical_camera pose: - xyz: [-0.3, 0.383, 1.27] - rpy: [0.2, 1.5707, 0] - logical_camera_2: - type: logical_camera - pose: - xyz: [0.3, 3.15, 1.5] - rpy: [0, 'pi/2', 0] - logical_camera_3: - type: logical_camera - pose: - xyz: [0.3, -3.15, 1.5] - rpy: [0, 'pi/2', 0] + xyz: [1.2, 3.5, 1.5] + rpy: [0, 1.5707, 0] depth_camera_1: type: depth_camera pose: - xyz: [-0.3, -0.383, 1.2] + xyz: [1.2, 0.75, 1.5] rpy: [0, 1.5707, 0] - laser_profiler_1: - type: laser_profiler - pose: - xyz: [1.21, 4, 1.6] - rpy: ['-pi', 'pi/2', 'pi/2'] diff --git a/rrrobot_ws/src/rrrobot/scripts/rrrobot_run.sh b/rrrobot_ws/src/rrrobot/scripts/rrrobot_run.sh index 9297dc7..58f2c13 100755 --- a/rrrobot_ws/src/rrrobot/scripts/rrrobot_run.sh +++ b/rrrobot_ws/src/rrrobot/scripts/rrrobot_run.sh @@ -1,8 +1,15 @@ #!/bin/bash +cd /app/rrrobot_ws/ + +catkin_make clean +catkin_make +catkin_make install + +cd /app/rrrobot_ws/src/rrrobot/scripts + sudo cp ../launch/rrrobot.launch /opt/ros/melodic/share/osrf_gear/launch sudo cp ../../../world/gear.py /opt/ros/melodic/lib/osrf_gear/gear.py sudo cp ../../../world/gear.world.template /opt/ros/melodic/share/osrf_gear/worlds/gear.world.template - roslaunch osrf_gear rrrobot.launch diff --git a/rrrobot_ws/src/rrrobot/scripts/rrrobot_run_no_build.sh b/rrrobot_ws/src/rrrobot/scripts/rrrobot_run_no_build.sh new file mode 100644 index 0000000..1fab546 --- /dev/null +++ b/rrrobot_ws/src/rrrobot/scripts/rrrobot_run_no_build.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +sudo cp ../launch/rrrobot.launch /opt/ros/melodic/share/osrf_gear/launch +sudo cp ../../../world/gear.py /opt/ros/melodic/lib/osrf_gear/gear.py +sudo cp ../../../world/gear.world.template /opt/ros/melodic/share/osrf_gear/worlds/gear.world.template + +roslaunch osrf_gear rrrobot.launch diff --git a/rrrobot_ws/world/gear.py b/rrrobot_ws/world/gear.py index 31a8497..bb4fcd6 100755 --- a/rrrobot_ws/world/gear.py +++ b/rrrobot_ws/world/gear.py @@ -57,22 +57,22 @@ arm_configs = { 'wrist_3_joint': 0, } }, - 'arm2': { - 'arm_type': 'ur10', - 'pose': { - 'xyz': [0.3, -0.92, 0.9], - 'rpy': [0.0, 0.0, 0.0] - }, - 'default_initial_joint_states': { - 'elbow_joint': 2.14, - 'linear_arm_actuator_joint': 0, - 'shoulder_lift_joint': -2.0, - 'shoulder_pan_joint': 3.14, - 'wrist_1_joint': 3.27, - 'wrist_2_joint': -1.51, - 'wrist_3_joint': 0, - } - }, + # 'arm2': { + # 'arm_type': 'ur10', + # 'pose': { + # 'xyz': [0.3, -0.92, 0.9], + # 'rpy': [0.0, 0.0, 0.0] + # }, + # 'default_initial_joint_states': { + # 'elbow_joint': 2.14, + # 'linear_arm_actuator_joint': 0, + # 'shoulder_lift_joint': -2.0, + # 'shoulder_pan_joint': 3.14, + # 'wrist_1_joint': 3.27, + # 'wrist_2_joint': -1.51, + # 'wrist_3_joint': 0, + # } + # }, } possible_products = [ 'disk_part', @@ -91,20 +91,20 @@ sensor_configs = { 'quality_control': None, } default_sensors = { - 'quality_control_sensor_1': { - 'type': 'quality_control', - 'pose': { - 'xyz': [0.3, 3.5, 1.5], - 'rpy': [0, 1.574, -1.574] - } - }, - 'quality_control_sensor_2': { - 'type': 'quality_control', - 'pose': { - 'xyz': [0.3, -3.5, 1.5], - 'rpy': [0, 1.574, 1.574] - } - }, + # 'quality_control_sensor_1': { + # 'type': 'quality_control', + # 'pose': { + # 'xyz': [0.3, 3.5, 1.5], + # 'rpy': [0, 1.574, -1.574] + # } + # }, + # 'quality_control_sensor_2': { + # 'type': 'quality_control', + # 'pose': { + # 'xyz': [0.3, -3.5, 1.5], + # 'rpy': [0, 1.574, 1.574] + # } + # }, } default_belt_models = { } @@ -530,7 +530,8 @@ def prepare_template_data(config_dict, args): 'faulty_products': {}, 'drops': {}, 'orders': {}, - 'options': {'insert_agvs': True}, + # 'options': {'insert_agvs': True}, + 'options': {'insert_agvs': False}, 'time_limit': default_time_limit, 'bin_height': bin_height, 'world_dir': world_dir,