From 6897d60619e7821efeac4da7e70b5d3fbb71961d Mon Sep 17 00:00:00 2001 From: RishikesavanRamesh Date: Wed, 21 Aug 2024 18:33:55 +0000 Subject: [PATCH] Complete E22 --- .devcontainer/ros2/compose.yml | 2 +- .vscode/tasks.json | 126 +++++++++++++++++++++++++++++++++ README.md | 8 ++- 3 files changed, 132 insertions(+), 4 deletions(-) diff --git a/.devcontainer/ros2/compose.yml b/.devcontainer/ros2/compose.yml index aa0150e..ebfb74d 100644 --- a/.devcontainer/ros2/compose.yml +++ b/.devcontainer/ros2/compose.yml @@ -5,7 +5,7 @@ services: volumes: - ../../.:/workspace/.:rw - /tmp/.X11-unix:/tmp/.X11-unix # Expose X11 socket - - /dev:/dev + # - /dev:/dev:rw environment: - SSH_KEY=$SSH_KEY - DISPLAY=:45 # ( see https://gist.github.com/RishikesavanRamesh/d8c085c958bc11e8562cd3db297e4eb8 ) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 1a93210..9d1278b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -88,6 +88,102 @@ }, "problemMatcher": [] }, + + { + "label": "new ros2 package", + "detail": "Create a new ROS 2 package from rtw template.", + "type": "shell", + "command": "bash", + "args": [ + "-c", + "ROS_WS=${workspaceFolder} ${workspaceFolder}/ros_team_workspace/scripts/create-new-package.bash ${input:package} '${input:packageDescription}'" + ], + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + }, + "options": { + "cwd": "${workspaceFolder}/src" + }, + }, + + { + "label": "setup robot description", + "detail": "Setup robot description from rtw template.", + "type": "shell", + "command": "bash", + "args": [ + "-c", + "ROS_WS=${workspaceFolder} ${workspaceFolder}/ros_team_workspace/scripts/setup-robot-description.bash ${input:robotName}" + ], + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + }, + "options": { + "cwd": "${workspaceFolder}/src/${input:dirName}" + }, + }, + + { + "label": "setup robot bringup", + "detail": "Setup robot bringup from rtw template.", + "type": "shell", + "command": "bash", + "args": [ + "-c", + "ROS_WS=${workspaceFolder} ${workspaceFolder}/ros_team_workspace/scripts/setup-robot-bringup.bash ${input:robotName} ${input:descriptionPackageName}" + ], + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + }, + "options": { + "cwd": "${workspaceFolder}/src/${input:dirName}" + }, + }, + + { + "label": "setup ros2_control control hardware", + "detail": "Setup ros2_control control hardware from rtw template.", + "type": "shell", + "command": "bash", + "args": [ + "-c", + "ROS_WS=${workspaceFolder} ${workspaceFolder}/ros_team_workspace/scripts/ros2_control/setup-hardware-interface-package.bash ${input:fileName} ${input:className}" + ], + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + }, + "options": { + "cwd": "${workspaceFolder}/src/${input:dirName}" + }, + }, + + { + "label": "setup ros2_control controller", + "detail": "Setup ros2_control controller from rtw template.", + "type": "shell", + "command": "bash", + "args": [ + "-c", + "ROS_WS=${workspaceFolder} ${workspaceFolder}/ros_team_workspace/scripts/ros2_control/setup-controller-package.bash ${input:fileName} ." + ], + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + }, + "options": { + "cwd": "${workspaceFolder}/src/${input:dirName}" + }, + }, + { "label": "import from workspace file", "detail": "Use vcs to import modules specified by a workspace/rosinstall file.", @@ -134,6 +230,36 @@ "id": "package", "type": "promptString", "description": "Package name" + }, + { + "id": "packageDescription", + "type": "promptString", + "description": "Package Description" + }, + { + "id": "robotName", + "type": "promptString", + "description": "Robot Name" + }, + { + "id": "dirName", + "type": "promptString", + "description": "Base Directory" + }, + { + "id": "descriptionPackageName", + "type": "promptString", + "description": "Description Package Name" + }, + { + "id": "fileName", + "type": "promptString", + "description": "File Name" + }, + { + "id": "className", + "type": "promptString", + "description": "Class Name" } ] } \ No newline at end of file diff --git a/README.md b/README.md index 63279b9..08bc3f1 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,15 @@ might also wanna add linting and batches for verifing features... - ~~DROPPED : EP10 need a add an additional file that will be sourced in post-scripts(one time sourceable or put in bashrc upto the user but need to provide provisions) which is for the particular project. :: DROPPING IN MERCY OF CONFIGURED TASKS~~ - ~~EP24 should update to vulcanexus humble base image~~ +- ~~EP12 need to use the rosteamworkspace folder structure for development~~ -- EP22 add templating from rtworking group into tasks -- EP12 need to use the rosteamworkspace folder structure for development +- ~~EP22 add templating from rtworking group into tasks~~ - EP23 why not mounting everything inside of /tmp/workspace so that one can easily save the contaienr for tools and softwares and the source code remains clean outside of container. +- EP25 tasks for gdb also - +- EP26 SHOULD ADD THE AUTO LISTING OF DIRS FOR INPUT FOR RTW TASKS ### for later @@ -52,6 +53,7 @@ might also wanna add linting and batches for verifing features... + ### issues : - i01: configured task ( purge failed saying cannot allocate ptr in this ros-tws-shell) :: solved when not mounting /dev:/dev have to look into it - setup-robot-description added the add_test twice in cmakelist, which causing failure of the package // it seems running init of setup-robot-description twice without removing dir is the issue..