Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix S27 pointcloud view, and build errors #37

Merged
merged 15 commits into from
Nov 14, 2024
92 changes: 34 additions & 58 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,45 @@ jobs:
name: "Set Version"
runs-on: ubuntu-latest
outputs:
install_path: ${{ steps.install_path_id.outputs.install_path }}
install_path_ubuntu: ${{ steps.install_path_id.outputs.install_path }}
install_path: ${{ steps.install_path_id.outputs.install_path }}
install_path_ubuntu: ${{ steps.install_path_id_ubuntu.outputs.install_path_ubuntu }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0 # Mandatory to use the extract version from tag action
fetch-depth: 0 # Fetch full history to access tags
fetch-tags: true

- name: Fetch tags explicitly
run: git fetch --tags

- name: Extract version from tag
uses: damienaicheh/[email protected]
id: extract_version
run: |
# Get the latest tag (e.g., v1.1.5) and remove the 'v' prefix if needed
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
VERSION=${TAG#v}

# Split VERSION into MAJOR, MINOR, and PATCH
MAJOR=$(echo "$VERSION" | cut -d. -f1)
MINOR=$(echo "$VERSION" | cut -d. -f2)
PATCH=$(echo "$VERSION" | cut -d. -f3)

# Export the version numbers as environment variables
echo "MAJOR=$MAJOR" >> $GITHUB_ENV
echo "MINOR=$MINOR" >> $GITHUB_ENV
echo "PATCH=$PATCH" >> $GITHUB_ENV

- name: Print version
run: echo "The version is ${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}"
run: echo "The version is ${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}"

- name: Set Output
id: install_path_id
run: echo "install_path=multisense_${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}_amd64" >> $GITHUB_OUTPUT
run: echo "install_path=multisense_${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}_amd64" >> $GITHUB_OUTPUT

- name: Set Output Ubuntu
id: install_path_id_ubuntu
run: echo "install_path_ubuntu=multisense_${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}_amd64/opt/multisense" >> $GITHUB_OUTPUT
run: echo "install_path_ubuntu=multisense_${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}_amd64/opt/multisense" >> $GITHUB_OUTPUT


ReleaseJob:
Expand Down Expand Up @@ -97,7 +119,7 @@ jobs:
runs-on: windows-2022

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'

Expand Down Expand Up @@ -148,7 +170,7 @@ jobs:
asset_content_type: application/zip

- name: "Create Artifact"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: multisense-zip
path: ${{github.workspace}}/MultiSense_viewer.zip
Expand All @@ -164,7 +186,7 @@ jobs:
steps:
- name: print install location
run: echo "My output is ${{ needs.VersionJob.outputs.install_path }}"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'

Expand Down Expand Up @@ -230,7 +252,7 @@ jobs:
steps:
- name: print install location
run: echo "My output is ${{ needs.VersionJob.outputs.install_path }}"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'

Expand Down Expand Up @@ -286,49 +308,3 @@ jobs:
asset_content_type: application/zip


build:
name: Create Windows Installer
needs: [BuildWindows, ReleaseJob]
runs-on: windows-2022

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Get Artifacts
uses: actions/download-artifact@v2
with:
name: multisense-zip

- name: Extract some files
run: |
mkdir files
tar -xf .\MultiSense_viewer.zip -C .\files\
mv .\files\Assets\Tools\windows\inno_setup_script.iss .\
mv .\files\Assets\Tools\compile.sh .\
mv .\files\Assets\Tools\install_spirv_compiler.sh .\
mv .\files\Assets\Tools\monitor_memory_usage.py .\
mv .\files\Assets\Tools\Windows\build_installer.ps1 .\
mv .\files\Assets\Tools\how_to_release .\
rm -R .\files\Assets\Tools\Ubuntu
rm -R .\files\bin
rm -R .\files\include
rm -R .\files\lib

shell: cmd
- name: Building the installer
run: |
"%programfiles(x86)%\inno Setup 6\iscc.exe" "inno_setup_script.iss"
shell: cmd

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.ReleaseJob.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./Output/MultiSenseSetup.exe
asset_name: MultiSenseSetup.exe
asset_content_type: application/zip

155 changes: 72 additions & 83 deletions .github/workflows/workflow_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,68 +17,93 @@ jobs:
name: "Set Version"
runs-on: ubuntu-latest
outputs:
install_path: ${{ steps.install_path_id.outputs.install_path }}
install_path_ubuntu: ${{ steps.install_path_id.outputs.install_path }}
install_path: ${{ steps.install_path_id.outputs.install_path }}
install_path_ubuntu: ${{ steps.install_path_id_ubuntu.outputs.install_path_ubuntu }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0 # Mandatory to use the extract version from tag action
fetch-depth: 0 # Fetch full history to access tags
fetch-tags: true

- name: Fetch tags explicitly
run: git fetch --tags

- name: Extract version from tag
uses: damienaicheh/[email protected]
id: extract_version
run: |
# Get the latest tag (e.g., v1.1.5) and remove the 'v' prefix if needed
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
VERSION=${TAG#v}

# Split VERSION into MAJOR, MINOR, and PATCH
MAJOR=$(echo "$VERSION" | cut -d. -f1)
MINOR=$(echo "$VERSION" | cut -d. -f2)
PATCH=$(echo "$VERSION" | cut -d. -f3)

# Export the version numbers as environment variables
echo "MAJOR=$MAJOR" >> $GITHUB_ENV
echo "MINOR=$MINOR" >> $GITHUB_ENV
echo "PATCH=$PATCH" >> $GITHUB_ENV

- name: Print version
run: echo "The version is ${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}"
run: echo "The version is ${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.PATCH }}"

- name: Set Output
id: install_path_id
run: echo "install_path=multisense_${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}_amd64" >> $GITHUB_OUTPUT
run: echo "install_path=multisense_${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}_amd64" >> $GITHUB_OUTPUT

- name: Set Output Ubuntu
id: install_path_id_ubuntu
run: echo "install_path_ubuntu=multisense_${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}_amd64/opt/multisense" >> $GITHUB_OUTPUT
run: echo "install_path_ubuntu=multisense_${{ env.MAJOR }}.${{ env.MINOR }}-${{ env.PATCH }}_amd64/opt/multisense" >> $GITHUB_OUTPUT




BuildWindows:
name: Build For Windows
name: Build and Create Installer for Windows
needs: [VersionJob]
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-2022

steps:
- uses: actions/checkout@v3
with:
submodules: 'true'


- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGIT_SUBMODULE=OFF -DWARNINGS_AS_ERRORS=FALSE #-D CMAKE_C_COMPILER=gcc-11 -D CMAKE_CXX_COMPILER=g++-11

- name: Build project
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install -- /m:10

- name: zipFiles
uses: vimtor/action-zip@v1
with:
files: ./build/${{ needs.VersionJob.outputs.install_path }}
dest: MultiSense_viewer.zip
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'

- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true

- name: "Create Artifact"
uses: actions/upload-artifact@v2
with:
name: multisense-zip
path: ${{github.workspace}}/MultiSense_viewer.zip
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGIT_SUBMODULE=OFF -DWARNINGS_AS_ERRORS=FALSE

- name: Build project
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install -- /m:10

# - name: Prepare Installer Files
# shell: powershell
# run: |
# # Move Inno Setup script and necessary tools into the build directory
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\Windows\inno_setup_script.iss" -Destination "$($env.GITHUB_WORKSPACE)\build"
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\Windows\build_installer.ps1" -Destination "$($env.GITHUB_WORKSPACE)\build"
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\compile.sh" -Destination "$($env.GITHUB_WORKSPACE)\build"
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\install_spirv_compiler.sh" -Destination "$($env.GITHUB_WORKSPACE)\build"
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\monitor_memory_usage.py" -Destination "$($env.GITHUB_WORKSPACE)\build"
# Move-Item -Path "$($env.GITHUB_WORKSPACE)\Assets\Tools\how_to_release" -Destination "$($env.GITHUB_WORKSPACE)\build"
#
# # Clean up unnecessary directories
# Remove-Item -Recurse -Force "$($env.GITHUB_WORKSPACE)\build\Assets\Tools\Ubuntu"
# Remove-Item -Recurse -Force "$($env.GITHUB_WORKSPACE)\build\bin"
# Remove-Item -Recurse -Force "$($env.GITHUB_WORKSPACE)\build\include"
# Remove-Item -Recurse -Force "$($env.GITHUB_WORKSPACE)\build\lib"
#
# - name: Building the installer
# run: |
# "%programfiles(x86)%\Inno Setup 6\iscc.exe" "$env.GITHUB_WORKSPACE\build\inno_setup_script.iss"
# shell: cmd

BuildUbuntu20:
name: Build and package for Ubuntu 20_04
Expand All @@ -91,7 +116,7 @@ jobs:
steps:
- name: print install location
run: echo "My output is ${{ needs.VersionJob.outputs.install_path }}"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'

Expand Down Expand Up @@ -146,7 +171,7 @@ jobs:
steps:
- name: print install location
run: echo "My output is ${{ needs.VersionJob.outputs.install_path }}"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'

Expand Down Expand Up @@ -189,39 +214,3 @@ jobs:
- name: Package
working-directory: ${{github.workspace}}/build
run: dpkg-deb --build --root-owner-group ${{ needs.VersionJob.outputs.install_path }}

build:
name: Create Windows Installer
needs: [BuildWindows]
runs-on: windows-2022

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Get Artifacts
uses: actions/download-artifact@v2
with:
name: multisense-zip

- name: Extract some files
run: |
mkdir files
tar -xf .\MultiSense_viewer.zip -C .\files\
mv .\files\Assets\Tools\windows\inno_setup_script.iss .\
mv .\files\Assets\Tools\compile.sh .\
mv .\files\Assets\Tools\install_spirv_compiler.sh .\
mv .\files\Assets\Tools\monitor_memory_usage.py .\
mv .\files\Assets\Tools\Windows\build_installer.ps1 .\
mv .\files\Assets\Tools\how_to_release .\
rm -R .\files\Assets\Tools\Ubuntu
rm -R .\files\bin
rm -R .\files\include
rm -R .\files\lib

shell: cmd
- name: Building the installer
run: |
"%programfiles(x86)%\inno Setup 6\iscc.exe" "inno_setup_script.iss"
shell: cmd

8 changes: 1 addition & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
cmake_minimum_required(VERSION 3.20)

#set(CMAKE_CXX_COMPILER "clang++")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl")

#set(CMAKE_C_COMPILER "clang")

project(
MultiSense-Viewer
DESCRIPTION "A MultiSense Viewer Application"
Expand All @@ -17,7 +11,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Set application version. Remember that it should always match the pushed tag in the form of v1.*-*
set(VERSION_MAJOR "1")
set(VERSION_MINOR "1")
set(VERSION_PATCH "4")
set(VERSION_PATCH "5")
set(ARCHITECTURE "amd64")

# Set install directory. Used to generate installers for both Windows and Ubuntu using their native approaches
Expand Down
5 changes: 3 additions & 2 deletions include/Viewer/ImGui/MainLayerExt/Preview3DExt.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class Preview3DExt : public VkRender::Layer {
ImGui::PushStyleColor(ImGuiCol_HeaderHovered, VkRender::Colors::CRLRedHover);
ImGui::PushStyleVar(ImGuiStyleVar_IndentSpacing, 10.0f);

createIMUHeader(handles, dev);
ImGui::Dummy(ImVec2());
//createIMUHeader(handles, dev);
//ImGui::Dummy(ImVec2());
createPointCloudHeader(handles, dev);


Expand Down Expand Up @@ -186,6 +186,7 @@ class Preview3DExt : public VkRender::Layer {
ImGui::BeginDisabled();
}


// IMU
ImGui::Dummy(ImVec2(0.0f, 15.0));
ImGui::Dummy(ImVec2(pos.paddingX, 0.0));
Expand Down
2 changes: 1 addition & 1 deletion include/Viewer/ImGui/MainLayerExt/SensorConfigurationExt.h
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ class SensorConfigurationExt : public VkRender::Layer {
bool btnClick = ImGui::Button("Set");
if (btnClick) {
ImGui::CloseCurrentPopup();
d.parameters.stereo.mtu = (float) customMTU; // Update the MTU with the custom value
d.parameters.stereo.mtu = static_cast<float>(customMTU); // Update the MTU with the custom value
d.parameters.stereo.update |= btnClick;
}
ImGui::EndPopup();
Expand Down
2 changes: 1 addition & 1 deletion include/Viewer/ImGui/SideBarLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ class SideBarLayer : public VkRender::Layer {
for (size_t n = 0; n < entryConnectDeviceList.size(); n++) {
if (entryConnectDeviceList[n].cameraName.empty()) continue;
if (ImGui::Selectable((entryConnectDeviceList[n].cameraName + "##" + std::to_string(n)).c_str(),
resultsComboIndex == n,
resultsComboIndex == static_cast<int>(n),
ImGuiSelectableFlags_DontClosePopups,
ImVec2(handles->info->popupWidth - (20.0f * 2), 15.0f))) {
handles->usageMonitor->userClickAction(entryConnectDeviceList[n].cameraName, "Selectable",
Expand Down
Loading
Loading