From 6bcd1a9d7c9366a9bb1acd56d63f94926848fbbf Mon Sep 17 00:00:00 2001 From: Johannes Mey <johannes.mey@tu-dresden.de> Date: Thu, 1 Sep 2022 20:08:50 +0200 Subject: [PATCH] align naming of config and launch files --- ... config_scene_virtual-tag-table-grey.json} | 0 ... config_scene_virtual-tag-table-grey.yaml} | 0 ...ll_ceti-table-1-emptyworld-coloured.launch | 17 ++++++++++++++ ...-cell_ceti-table-1-emptyworld-grey.launch} | 2 +- ...ll_ceti-table-1-emptyworld-coloured.launch | 23 +++++++++++++++++++ ...-cell_ceti-table-1-emptyworld-grey.launch} | 2 +- ...main_controller_virtual-tag_preview.launch | 2 +- .../object-localization/tag_detection.launch | 5 ++-- src/main_controller.cpp | 2 +- 9 files changed, 47 insertions(+), 6 deletions(-) rename config/{config_scene_virtual-tag-table.json => config_scene_virtual-tag-table-grey.json} (100%) rename config/{config_scene_virtual-tag-table.yaml => config_scene_virtual-tag-table-grey.yaml} (100%) create mode 100644 launch/cell-controllers/noop-sim-cell_ceti-table-1-emptyworld-coloured.launch rename launch/cell-controllers/{noop-sim-cell_ceti-table-1-emptyworld.launch => noop-sim-cell_ceti-table-1-emptyworld-grey.launch} (92%) create mode 100644 launch/cell-controllers/robot-cell_ceti-table-1-emptyworld-coloured.launch rename launch/cell-controllers/{robot-cell_ceti-table-1-emptyworld.launch => robot-cell_ceti-table-1-emptyworld-grey.launch} (93%) diff --git a/config/config_scene_virtual-tag-table.json b/config/config_scene_virtual-tag-table-grey.json similarity index 100% rename from config/config_scene_virtual-tag-table.json rename to config/config_scene_virtual-tag-table-grey.json diff --git a/config/config_scene_virtual-tag-table.yaml b/config/config_scene_virtual-tag-table-grey.yaml similarity index 100% rename from config/config_scene_virtual-tag-table.yaml rename to config/config_scene_virtual-tag-table-grey.yaml diff --git a/launch/cell-controllers/noop-sim-cell_ceti-table-1-emptyworld-coloured.launch b/launch/cell-controllers/noop-sim-cell_ceti-table-1-emptyworld-coloured.launch new file mode 100644 index 0000000..d0f0ba6 --- /dev/null +++ b/launch/cell-controllers/noop-sim-cell_ceti-table-1-emptyworld-coloured.launch @@ -0,0 +1,17 @@ +<launch> + + <!-- MQTT server for communication with client cells --> + <arg name="mqtt_server" default="tcp://localhost:1883" doc="address of the mqtt server for the connection to the controller"/> + + <include file="$(find ccf)/launch/noop-sim_setup.launch"/> + + <param name="/connector_node_ros_ccf/topics/command" value="/ceti_cell_empty/command"/> + + <node pkg="ccf_immersive_sorting" type="moveit_sorting_controller" name="ceti_cell_empty" output="screen"> + <param name="arm" type="string" value="arm"/> + <param name="scene_observer" type="string" value="object_locator/scene/update"/> + <param name="mqtt_server" type="yaml" value="$(arg mqtt_server)"/> + <param name="scene" type="string" value="$(find ccf_immersive_sorting)/config/config_scene_ceti-table-1-empty-coloured.json"/> + </node> + +</launch> diff --git a/launch/cell-controllers/noop-sim-cell_ceti-table-1-emptyworld.launch b/launch/cell-controllers/noop-sim-cell_ceti-table-1-emptyworld-grey.launch similarity index 92% rename from launch/cell-controllers/noop-sim-cell_ceti-table-1-emptyworld.launch rename to launch/cell-controllers/noop-sim-cell_ceti-table-1-emptyworld-grey.launch index 0293f11..e4ee08f 100644 --- a/launch/cell-controllers/noop-sim-cell_ceti-table-1-emptyworld.launch +++ b/launch/cell-controllers/noop-sim-cell_ceti-table-1-emptyworld-grey.launch @@ -11,7 +11,7 @@ <param name="arm" type="string" value="arm"/> <param name="scene_observer" type="string" value="object_locator/scene/update"/> <param name="mqtt_server" type="yaml" value="$(arg mqtt_server)"/> - <param name="scene" type="string" value="$(find ccf_immersive_sorting)/config/config_scene_ceti-table-1-empty.json"/> + <param name="scene" type="string" value="$(find ccf_immersive_sorting)/config/config_scene_ceti-table-1-empty-grey.json"/> </node> </launch> diff --git a/launch/cell-controllers/robot-cell_ceti-table-1-emptyworld-coloured.launch b/launch/cell-controllers/robot-cell_ceti-table-1-emptyworld-coloured.launch new file mode 100644 index 0000000..3f8c853 --- /dev/null +++ b/launch/cell-controllers/robot-cell_ceti-table-1-emptyworld-coloured.launch @@ -0,0 +1,23 @@ +<launch> + + <!-- MQTT server for communication with client cells --> + <arg name="mqtt_server" default="tcp://localhost:1883" doc="address of the mqtt server for the connection to the controller"/> + + <!-- robot IP used by the robot controller --> + <arg name="robot_ip" default="172.31.1.13" doc="ip address if the robot"/> + + <include file="$(find ccf)/launch/robot_setup.launch"> + <arg name="robot_ip" value="$(arg robot_ip)"/> + <arg name="load_gripper" value="true"/> + </include> + + <param name="/connector_node_ros_ccf/topics/command" value="/ceti_cell_empty/command"/> + + <node pkg="ccf_immersive_sorting" type="moveit_sorting_controller" name="ceti_cell_empty" output="screen"> + <param name="arm" type="string" value="arm"/> + <param name="scene_observer" type="string" value="object_locator/scene/update"/> + <param name="mqtt_server" type="yaml" value="$(arg mqtt_server)"/> + <param name="scene" type="string" value="$(find ccf_immersive_sorting)/config/config_scene_ceti-table-1-empty-coloured.json"/> + </node> + +</launch> diff --git a/launch/cell-controllers/robot-cell_ceti-table-1-emptyworld.launch b/launch/cell-controllers/robot-cell_ceti-table-1-emptyworld-grey.launch similarity index 93% rename from launch/cell-controllers/robot-cell_ceti-table-1-emptyworld.launch rename to launch/cell-controllers/robot-cell_ceti-table-1-emptyworld-grey.launch index 6d04b2e..1f04aab 100644 --- a/launch/cell-controllers/robot-cell_ceti-table-1-emptyworld.launch +++ b/launch/cell-controllers/robot-cell_ceti-table-1-emptyworld-grey.launch @@ -17,7 +17,7 @@ <param name="arm" type="string" value="arm"/> <param name="scene_observer" type="string" value="object_locator/scene/update"/> <param name="mqtt_server" type="yaml" value="$(arg mqtt_server)"/> - <param name="scene" type="string" value="$(find ccf_immersive_sorting)/config/config_scene_ceti-table-1-empty.json"/> + <param name="scene" type="string" value="$(find ccf_immersive_sorting)/config/config_scene_ceti-table-1-empty-grey.json"/> </node> </launch> diff --git a/launch/distributed-sorting/main_controller_virtual-tag_preview.launch b/launch/distributed-sorting/main_controller_virtual-tag_preview.launch index 49770c6..85f4cbb 100644 --- a/launch/distributed-sorting/main_controller_virtual-tag_preview.launch +++ b/launch/distributed-sorting/main_controller_virtual-tag_preview.launch @@ -9,7 +9,7 @@ <param name="client_controllers" type="yaml" value="$(arg client_controllers)"/> <param name="mqtt_server" type="yaml" value="$(arg mqtt_server)"/> <param name="arm" type="string" value="virtual-arm"/> - <param name="scene" type="string" value="$(find ccf_immersive_sorting)/config/config_scene_virtual-tag-table.json"/> + <param name="scene" type="string" value="$(find ccf_immersive_sorting)/config/config_scene_virtual-tag-table-grey.json"/> </node> </launch> diff --git a/launch/object-localization/tag_detection.launch b/launch/object-localization/tag_detection.launch index c573ef9..5616633 100644 --- a/launch/object-localization/tag_detection.launch +++ b/launch/object-localization/tag_detection.launch @@ -3,19 +3,20 @@ <arg name="node_namespace" default="apriltag_ros_continuous_node" /> <arg name="camera_name" default="/usb_cam" /> <arg name="image_topic" default="image_rect" /> + <arg name="device" default="/dev/video0" /> <!-- Set parameters --> <rosparam command="load" file="$(find ccf_immersive_sorting)/config/settings.yaml" ns="$(arg node_namespace)" /> <rosparam command="load" file="$(find ccf_immersive_sorting)/config/tags.yaml" ns="$(arg node_namespace)" /> <node name="usb_cam" pkg="usb_cam" type="usb_cam_node" output="log"> - <param name="video_device" value="/dev/video2" /> + <param name="video_device" value="$(arg device)" /> <param name="image_width" value="2560" /> <param name="image_height" value="1440" /> <param name="autofocus" value="1" /> <param name="pixel_format" value="mjpeg"/> <param name="framerate" value="4"/> - </node> + </node> <node name="image_proc" pkg="image_proc" type="image_proc" ns="usb_cam"/> diff --git a/src/main_controller.cpp b/src/main_controller.cpp index 2b5271f..f829379 100644 --- a/src/main_controller.cpp +++ b/src/main_controller.cpp @@ -91,7 +91,7 @@ int main(int argc, char **argv) // uncomment in case things fail. clients[client].proceedWithTask(); }); } - auto fallback_path = ros::package::getPath("ccf_immersive_sorting") + "/config/config_scene_virtual-tag-table.json"; + auto fallback_path = ros::package::getPath("ccf_immersive_sorting") + "/config/config_scene_virtual-tag-table-grey.json"; controller.loadScene(getPrivateParameter<std::string>("scene", fallback_path)); Object *robot = controller.resolveObject(controller.getRobotName()); -- GitLab