diff --git a/.env b/.env index cae6c745d..9f9944d50 100644 --- a/.env +++ b/.env @@ -11,7 +11,7 @@ PROJECT_NAME="airstack" # If you've run ./airstack.sh setup, then this will auto-generate from the git commit hash every time a change is made # to a Dockerfile or docker-compose.yaml file. Otherwise this can also be set explicitly to make a release version. # auto-generated from git commit hash -DOCKER_IMAGE_TAG="0.15.0" +DOCKER_IMAGE_TAG="0.15.1" # Can replace with your docker hub username PROJECT_DOCKER_REGISTRY="airlab-docker.andrew.cmu.edu/airstack" # ============================================ diff --git a/common/ros_packages/rqt_behavior_tree/src/rqt_behavior_tree/py_console.py b/common/ros_packages/rqt_behavior_tree/src/rqt_behavior_tree/py_console.py index 7409b592d..2af5a5cfd 100644 --- a/common/ros_packages/rqt_behavior_tree/src/rqt_behavior_tree/py_console.py +++ b/common/ros_packages/rqt_behavior_tree/src/rqt_behavior_tree/py_console.py @@ -201,7 +201,7 @@ def robot_selection_callback(self, msg): if msg.data not in self.behavior_tree_graphviz_subs.keys(): def callback(m): self.robot_graphviz_callback(msg.data, m) - self.behavior_tree_graphviz_subs[msg.data] = self.node.create_subscription(String, + self.behavior_tree_graphviz_subs[msg.data] = self.node.create_subscription(GraphVizXdot, '/' + msg.data + \ '/behavior/behavior_tree_graphviz', callback, diff --git a/gcs/docker/Dockerfile.gcs b/gcs/docker/Dockerfile.gcs index af69bb685..ea8441810 100644 --- a/gcs/docker/Dockerfile.gcs +++ b/gcs/docker/Dockerfile.gcs @@ -34,28 +34,7 @@ RUN mkdir /var/run/sshd && echo 'root:airstack' | chpasswd && \ EXPOSE 22 # TMux config -RUN git clone https://github.com/tmux-plugins/tpm /home/gcs/.tmux/plugins/tpm - - -WORKDIR /home/gcs/AirStack/gcs/ros_ws -# Make it so that files created within the container reflect the user's UID/GID so they don't have to change file permissions from root. See https://github.com/boxboat/fixuid -# need to give access to docker to access container name -# creates user "gcs" with UID 1000, home directory /home/gcs, and shell /bin/sh -# creates group "gcs" with GID 1000 -RUN addgroup --gid 1000 gcs && \ - adduser --uid 1000 --ingroup gcs --home /home/gcs --shell /bin/bash --disabled-password --gecos "" gcs && \ - chown -R gcs:gcs /home/gcs && \ - usermod -aG sudo gcs && \ - echo "gcs ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/gcs && \ - echo "gcs:gcs" | chpasswd - -RUN USER=gcs && \ - GROUP=gcs && \ - curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - && \ - chown root:root /usr/local/bin/fixuid && \ - chmod 4755 /usr/local/bin/fixuid && \ - mkdir -p /etc/fixuid && \ - printf "user: $USER\ngroup: $GROUP\n" > /etc/fixuid/config.yml +RUN git clone https://github.com/tmux-plugins/tpm /root/.tmux/plugins/tpm RUN wget https://get.foxglove.dev/desktop/latest/foxglove-studio-latest-linux-amd64.deb RUN apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update && apt -o APT::Get::AllowUnauthenticated=true install -y ./foxglove-studio-latest-linux-amd64.deb @@ -64,5 +43,4 @@ RUN apt -o APT::Get::AllowUnauthenticated=true install -y ros-humble-foxglove-br # Cleanup. Prevent people accidentally doing git commits from within Docker RUN apt purge git -y && apt autoremove -y && apt clean -y && rm -rf /var/lib/apt/lists/* -USER gcs:gcs -ENTRYPOINT ["fixuid"] +WORKDIR /root/AirStack/gcs/ros_ws \ No newline at end of file diff --git a/gcs/docker/gcs-base-docker-compose.yaml b/gcs/docker/gcs-base-docker-compose.yaml index 68097ed52..800fcc920 100644 --- a/gcs/docker/gcs-base-docker-compose.yaml +++ b/gcs/docker/gcs-base-docker-compose.yaml @@ -38,17 +38,17 @@ services: tty: true volumes: # display stuff - - $HOME/.Xauthority:/home/gcs/.Xauthority + - $HOME/.Xauthority:/root/.Xauthority - /tmp/.X11-unix:/tmp/.X11-unix # developer stuff - - ../../common/.bash_profile:/home/gcs/.bash_profile:rw - - .bashrc:/home/gcs/.bashrc:rw - - ../../common/.tmux.conf:/home/gcs/.tmux.conf:rw + - ../../common/.bash_profile:/root/.bash_profile:rw + - .bashrc:/root/.bashrc:rw + - ../../common/.tmux.conf:/root/.tmux.conf:rw - ../../common/inputrc:/etc/inputrc:rw - - ../../.devcontainer/gcs/launch.json:/home/gcs/AirStack/.vscode/launch.json:rw - - ../../.devcontainer/gcs/tasks.json:/home/gcs/AirStack/.vscode/tasks.json:rw - - ./Foxglove:/home/gcs/.config/Foxglove:rw + - ../../.devcontainer/gcs/launch.json:/root/AirStack/.vscode/launch.json:rw + - ../../.devcontainer/gcs/tasks.json:/root/AirStack/.vscode/tasks.json:rw + - ./Foxglove:/root/.config/Foxglove:rw # autonomy stack stuff - - ../..:/home/gcs/AirStack - - ../../common/ros_packages:/home/gcs/AirStack/gcs/ros_ws/src/common:rw # common ROS packages - - ../../common/ros_packages/fastdds.xml:/home/gcs/AirStack/gcs/ros_ws/fastdds.xml:rw # fastdds.xml \ No newline at end of file + - ../..:/root/AirStack + - ../../common/ros_packages:/root/AirStack/gcs/ros_ws/src/common:rw # common ROS packages + - ../../common/ros_packages/fastdds.xml:/root/AirStack/gcs/ros_ws/fastdds.xml:rw # fastdds.xml \ No newline at end of file diff --git a/gcs/ros_ws/src/gcs_bringup/config/gcs.perspective b/gcs/ros_ws/src/gcs_bringup/config/gcs.perspective index c36e689f5..856123b61 100644 --- a/gcs/ros_ws/src/gcs_bringup/config/gcs.perspective +++ b/gcs/ros_ws/src/gcs_bringup/config/gcs.perspective @@ -110,11 +110,11 @@ "plugin": { "keys": { "command_config_filename": { - "repr": "'/home/gcs/AirStack/gcs/ros_ws/install/rqt_gcs/share/rqt_gcs/config/gui_config.yaml'", + "repr": "'/root/AirStack/gcs/ros_ws/install/rqt_gcs/share/rqt_gcs/config/gui_config.yaml'", "type": "repr" }, "trajectory_config_filename": { - "repr": "'/home/gcs/AirStack/gcs/ros_ws/install/rqt_gcs/share/rqt_gcs/config/fixed_trajectories.yaml'", + "repr": "'/root/AirStack/gcs/ros_ws/install/rqt_gcs/share/rqt_gcs/config/fixed_trajectories.yaml'", "type": "repr" } }, diff --git a/mkdocs.yml b/mkdocs.yml index bc5774947..031d648b6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -90,6 +90,8 @@ nav: - robot/ros_ws/src/autonomy/3_local/b_planners/takeoff_landing_planner/test/README.md - DROAN (Obstacle Avoidance Planner): - robot/ros_ws/src/autonomy/3_local/b_planners/droan_local_planner/README.md + - DROAN GL: + - robot/ros_ws/src/autonomy/3_local/b_planners/droan_gl/README.md - Controls: - docs/robot/autonomy/3_local/controls/index.md - robot/ros_ws/src/autonomy/3_local/c_controls/trajectory_controller/README.md diff --git a/robot/docker/Dockerfile.robot b/robot/docker/Dockerfile.robot index b803b2e04..c76c351f9 100644 --- a/robot/docker/Dockerfile.robot +++ b/robot/docker/Dockerfile.robot @@ -203,55 +203,12 @@ RUN if [ "$SKIP_MACVO" != "true" ]; then pip uninstall matplotlib -y; fi # TMux config -RUN git clone https://github.com/tmux-plugins/tpm /home/robot/.tmux/plugins/tpm - -WORKDIR /home/robot/AirStack/robot/ros_ws - -# Make it so that files created within the container reflect the user's UID/GID so they don't have to change file permissions from root. See https://github.com/boxboat/fixuid -# need to give access to docker to access container name -# creates user "robot" with UID 1000, home directory /home/robot, and shell /bin/bash -# creates group "robot" with GID 1000 -RUN addgroup --gid 1000 robot && \ - adduser --uid 1000 --ingroup robot --home /home/robot --shell /bin/bash --disabled-password --gecos "" robot && \ - chown -R robot:robot /home/robot && \ - usermod -aG sudo robot && \ - echo "robot ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/robot && \ - echo "robot:robot" | chpasswd - - -ARG REAL_ROBOT=false -RUN if [ "$REAL_ROBOT" = "true" ]; then \ - # Put commands here that should run for the real robot but not the sim - echo "REAL_ROBOT is true"; \ - apt-get ${UPDATE_FLAGS} update && apt-get ${INSTALL_FLAGS} install -y libimath-dev; \ - groupadd -g 20 dialout; \ - usermod -aG dialout robot; \ - USER=robot && \ - GROUP=robot && \ - curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-arm64.tar.gz | tar -C /usr/local/bin -xzf - && \ - chown root:root /usr/local/bin/fixuid && \ - chmod 4755 /usr/local/bin/fixuid && \ - mkdir -p /etc/fixuid && \ - printf "user: $USER\ngroup: $GROUP\n" > /etc/fixuid/config.yml; \ -else \ - # Put commands here that should be run for the sim but not the real robot - echo "REAL_ROBOT is false"; \ - USER=robot && \ - GROUP=robot && \ - curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - && \ - chown root:root /usr/local/bin/fixuid && \ - chmod 4755 /usr/local/bin/fixuid && \ - mkdir -p /etc/fixuid && \ - printf "user: $USER\ngroup: $GROUP\n" > /etc/fixuid/config.yml; \ - fi - +RUN git clone https://github.com/tmux-plugins/tpm /root/.tmux/plugins/tpm +WORKDIR /root/AirStack/robot/ros_ws # Cleanup RUN apt autoremove -y \ && apt clean -y \ && rm -rf /var/lib/apt/lists/* -USER robot:robot -ENTRYPOINT ["fixuid"] - diff --git a/robot/docker/docker-compose.yaml b/robot/docker/docker-compose.yaml index c10d93b07..350bf3690 100644 --- a/robot/docker/docker-compose.yaml +++ b/robot/docker/docker-compose.yaml @@ -11,7 +11,6 @@ services: file: ./robot-base-docker-compose.yaml service: robot_base image: &desktop_image ${PROJECT_DOCKER_REGISTRY}/${PROJECT_NAME}:v${DOCKER_IMAGE_TAG}_robot-x86-64 - user: "${USER_ID:-1000}:${GROUP_ID:-1000}" build: dockerfile: ./Dockerfile.robot args: diff --git a/robot/docker/robot-base-docker-compose.yaml b/robot/docker/robot-base-docker-compose.yaml index 7a2f37e98..e3df6731e 100644 --- a/robot/docker/robot-base-docker-compose.yaml +++ b/robot/docker/robot-base-docker-compose.yaml @@ -48,15 +48,15 @@ services: - $HOME/.Xauthority:/.Xauthority - /tmp/.X11-unix:/tmp/.X11-unix # developer stuff - - .dev:/home/robot/.dev:rw # developer config - - ../../common/.bash_profile:/home/robot/.bash_profile:rw - - .bashrc:/home/robot/.bashrc:rw # bash config + - .dev:/root/.dev:rw # developer config + - ../../common/.bash_profile:/root/.bash_profile:rw + - .bashrc:/root/.bashrc:rw # bash config - ../../common/inputrc:/etc/inputrc:rw # for using page up/down to search through command history - - ../../common/.tmux.conf:/home/robot/.tmux.conf:rw # tmux config - - ../../.devcontainer/robot/launch.json:/home/robot/AirStack/.vscode/launch.json:rw - - ../../.devcontainer/robot/tasks.json:/home/robot/AirStack/.vscode/tasks.json:rw + - ../../common/.tmux.conf:/root/.tmux.conf:rw # tmux config + - ../../.devcontainer/robot/launch.json:/root/AirStack/.vscode/launch.json:rw + - ../../.devcontainer/robot/tasks.json:/root/AirStack/.vscode/tasks.json:rw # autonomy stack stuff - - ../..:/home/robot/AirStack - - ../../common/ros_packages:/home/robot/AirStack/robot/ros_ws/src/common:rw # common ROS packages - - ../../common/ros_packages/fastdds.xml:/home/robot/AirStack/robot/ros_ws/fastdds.xml:rw # fastdds.xml + - ../..:/root/AirStack + - ../../common/ros_packages:/root/AirStack/robot/ros_ws/src/common:rw # common ROS packages + - ../../common/ros_packages/fastdds.xml:/root/AirStack/robot/ros_ws/fastdds.xml:rw # fastdds.xml diff --git a/robot/ros_ws/base_link: b/robot/ros_ws/base_link: deleted file mode 100644 index e69de29bb..000000000 diff --git a/robot/ros_ws/src/autonomy/3_local/b_planners/droan_local_planner/README.md b/robot/ros_ws/src/autonomy/3_local/b_planners/droan_local_planner/README.md index c047185ca..fa662b0ed 100644 --- a/robot/ros_ws/src/autonomy/3_local/b_planners/droan_local_planner/README.md +++ b/robot/ros_ws/src/autonomy/3_local/b_planners/droan_local_planner/README.md @@ -15,4 +15,4 @@ DROAN local planner takes the global plan, and finds the global plan's closest p DROAN trims the global plan to be from that point to the end of the global plan. Consequently, DROAN currently does NOT use a waypoint manager, and is NOT guaranteed to reach every waypoint on the global plan, especially if the global plan loops back on itself. -Ideally in the future we will use a proper waypoint manager. \ No newline at end of file +Ideally in the future we will use a proper waypoint manager. diff --git a/robot/ros_ws/src/robot_bringup/config/core.perspective b/robot/ros_ws/src/robot_bringup/config/core.perspective index 3b6b0f157..e3da0f3a6 100644 --- a/robot/ros_ws/src/robot_bringup/config/core.perspective +++ b/robot/ros_ws/src/robot_bringup/config/core.perspective @@ -79,7 +79,7 @@ "plugin": { "keys": { "config_filename": { - "repr": "'/home/robot/AirStack/robot/ros_ws/install/rqt_behavior_tree_command/share/rqt_behavior_tree_command/config/gui_config.yaml'", + "repr": "'/root/AirStack/robot/ros_ws/install/rqt_behavior_tree_command/share/rqt_behavior_tree_command/config/gui_config.yaml'", "type": "repr" } }, @@ -114,7 +114,7 @@ "type": "repr" }, "config_filename": { - "repr": "'/home/robot/AirStack/robot/ros_ws/install/rqt_fixed_trajectory_generator/share/rqt_fixed_trajectory_generator/config/fixed_trajectories.yaml'", + "repr": "'/root/AirStack/robot/ros_ws/install/rqt_fixed_trajectory_generator/share/rqt_fixed_trajectory_generator/config/fixed_trajectories.yaml'", "type": "repr" } }, diff --git a/robot/ros_ws/src/robot_bringup/launch/robot.launch.xml b/robot/ros_ws/src/robot_bringup/launch/robot.launch.xml index 8868cbcf7..cdde70209 100644 --- a/robot/ros_ws/src/robot_bringup/launch/robot.launch.xml +++ b/robot/ros_ws/src/robot_bringup/launch/robot.launch.xml @@ -39,7 +39,7 @@ diff --git a/robot/ros_ws/src/robot_bringup/rviz/robot.rviz b/robot/ros_ws/src/robot_bringup/rviz/robot.rviz index b35619ef5..99aafb5bc 100644 --- a/robot/ros_ws/src/robot_bringup/rviz/robot.rviz +++ b/robot/ros_ws/src/robot_bringup/rviz/robot.rviz @@ -36,7 +36,7 @@ Panels: - Class: rviz_behavior_tree_panel::BehaviorTreePanel Name: BehaviorTreePanel topic: /robot_1/behavior/behavior_tree_graphviz - zoom_factor: 0.19198513237810166 + zoom_factor: 0.1919851303100586 Visualization Manager: Class: "" Displays: @@ -71,16 +71,20 @@ Visualization Manager: Value: false base_link_body_body_link: Value: false - base_link_frd: - Value: true base_link_stabilized: Value: false camera_left: Value: true camera_right: Value: true + front_stereo_left_camera_optical_frame: + Value: true + front_stereo_right_camera_optical_frame: + Value: true imu: Value: false + left_camera_link: + Value: true lidar: Value: false look_ahead_point: @@ -91,11 +95,7 @@ Visualization Manager: Value: false map: Value: true - map_ned: - Value: true - odom: - Value: true - odom_ned: + right_camera_link: Value: true tracking_point: Value: false @@ -124,16 +124,18 @@ Visualization Manager: {} imu: {} - base_link_frd: - {} + left_camera_link: + front_stereo_left_camera_optical_frame: + {} + right_camera_link: + front_stereo_right_camera_optical_frame: + {} base_link_stabilized: {} look_ahead_point: {} look_ahead_point_stabilized: {} - map_ned: - {} tracking_point: {} tracking_point_stabilized: @@ -338,6 +340,40 @@ Visualization Manager: Reliability Policy: Reliable Value: /robot_1/sensors/front_stereo/right/depth_ground_truth Value: true + - Alpha: 1 + Autocompute Intensity Bounds: true + Autocompute Value Bounds: + Max Value: 18.48733139038086 + Min Value: -5.648834705352783 + Value: true + Axis: Z + Channel Name: intensity + Class: rviz_default_plugins/PointCloud2 + Color: 170; 170; 255 + Color Transformer: RGB8 + Decay Time: 1 + Enabled: true + Invert Rainbow: false + Max Color: 255; 255; 255 + Max Intensity: 4096 + Min Color: 0; 0; 0 + Min Intensity: 0 + Name: Disparity + Position Transformer: XYZ + Selectable: true + Size (Pixels): 3 + Size (m): 0.10000000149011612 + Style: Points + Topic: + Depth: 5 + Durability Policy: Volatile + Filter size: 10 + History Policy: Keep Last + Reliability Policy: Reliable + Value: /robot_1/sensors/front_stereo/pointcloud + Use Fixed Frame: true + Use rainbow: true + Value: true Enabled: true Name: Sensors - Class: rviz_common/Group @@ -439,8 +475,7 @@ Visualization Manager: Enabled: true Name: Trimmed Global Plan for DROAN Namespaces: - global_plan: true - global_plan_extra_text: true + {} Topic: Depth: 5 Durability Policy: Volatile @@ -564,7 +599,7 @@ Visualization Manager: Enabled: true Invert Rainbow: false Max Color: 255; 255; 255 - Max Intensity: 49 + Max Intensity: 33 Min Color: 0; 0; 0 Min Intensity: 0 Name: Foreground Background Cloud @@ -630,8 +665,7 @@ Visualization Manager: Enabled: true Name: Global Plan Vis Namespaces: - global_plan: true - global_plan_extra_text: true + {} Topic: Depth: 5 Durability Policy: Volatile @@ -660,7 +694,6 @@ Visualization Manager: Name: Traj Vis Namespaces: traj_controller: true - traj_controller_extra_text: true Topic: Depth: 5 Durability Policy: Volatile @@ -775,7 +808,7 @@ Visualization Manager: Views: Current: Class: rviz_default_plugins/Orbit - Distance: 12.721861839294434 + Distance: 22.7436466217041 Enable Stereo Rendering: Stereo Eye Separation: 0.05999999865889549 Stereo Focal Distance: 1 @@ -790,10 +823,10 @@ Visualization Manager: Invert Z Axis: false Name: Current View Near Clip Distance: 0.009999999776482582 - Pitch: 0.7453970909118652 + Pitch: 0.4253985285758972 Target Frame: base_link Value: Orbit (rviz) - Yaw: 1.6603955030441284 + Yaw: 3.0753984451293945 Saved: ~ Window Geometry: BehaviorTreePanel: @@ -819,5 +852,5 @@ Window Geometry: Views: collapsed: false Width: 1980 - X: 261 - Y: 112 + X: 314 + Y: 155