Cannot call the ros launch file which is available in the snap

I made the snap to my store under edge channel.
And installed a snap on my pi
And the snap interface looks ok.
But the launch-project failed to execute the roslaunch command with my launch file.

My folder structure looks like this.

And I am getting the following error

When testing the ros catkin packages I did the source the /devel/setup.bash. And I was able to use the command

roslaunch robot_setup_tf robot_setup_tf.launch

Do I need to do the same/similar thing in Snap as well?

I saw few answers it was saying my folder structure might be one of the reason.
Is there anything wrong in my folder structure?
Am I missing any other configurations to access my launch file from the snap command?

Regards,
Lingaa

Kind Regards,
Lingaa

Please paste your snapcraft.yaml file’s apps and parts section, especially the part definition that ships your launcher file.

Hello Lin-Buo-Ren,

snapcraft.yaml file

name: rosrobot-proto1 # you probably want to 'snapcraft register <name>'
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: ROS robot prototype1 # 79 char long summary
description: |
  This is ros robot prototype1. It has ros kinetic as a tar ball.

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots

plugs:
  # Mount the content shared from ros-base into $SNAP/ros-base
  ros-base-armhf:
    content: ros-base-armhf-v1
    interface: content
    target: /ros-base-armhf

apps:

  launch-project:
    command: run-system
    plugs: [network, network-bind, ros-base-armhf]

parts:

  # The `source` here is the tarred staging area of the ros-base snap.
  ros-base-armhf:
    plugin: dump
    source: ros-base-armhf.tar.bz2
    source-type: tar

    # This is only used for building-- filter it out of the final snap.
    prime: [-*]

  rosrobot-proto1:
    source: https://github.com/Lingaprahasam/ROSRobotP1.io.git
    source-branch: master
    source-subdir: rosrobot-proto1
    plugin: catkin
    rosdistro: kinetic
    include-roscore: false
    underlay:
      # Build-time location of the underlay
      # On Pi Platform
      build-path: $SNAPCRAFT_STAGE/opt/ros/kinetic
      
      # On Ubuntu machine
      #build-path: /opt/ros/kinetic

      # Run-time location of the underlay
      run-path: $SNAP/ros-base-armhf/opt/ros/kinetic
    catkin-packages:
      - robot_setup_tf      
    after: [ros-base-armhf]
  
  run-system:
    source: https://github.com/Lingaprahasam/ROSRobotP1.io.git
    source-branch: master
    source-subdir: rosrobot-proto1
    plugin: dump
    stage: [bin/run-system]
    prime: [bin/run-system]

  mountpoint:
    plugin: nil
    install: mkdir $SNAPCRAFT_PART_INSTALL/ros-base-armhf

run-system file

#!/bin/bash



case $SNAP_ARCH in

amd64)

	TRIPLET="x86_64-linux-gnu"

	;;

armhf)

	TRIPLET="arm-linux-gnueabihf"

	;;

arm64)

	TRIPLET="aarch64-linux-gnu"

	;;

*)

	TRIPLET="$SNAP_ARCH-linux-gnu"

	;;

esac



export ROS_BASE=$SNAP/ros-base-armhf



# Add ros-base to the PYTHONPATH

export PYTHONPATH=$PYTHONPATH:$ROS_BASE/usr/lib/python2.7/dist-packages



# Add ros-base to LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROS_BASE/lib

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROS_BASE/lib/$TRIPLET

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROS_BASE/usr/lib

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROS_BASE/usr/lib/$TRIPLET

roslaunch robot_setup_tf robot_setup_tf.launch