Error while setting up Movesense platform with Cmake commands - c++

I've been trying to set up movesense platform in my windows 10 machine and facing issues with cmake commands.
I pulled the movesense container using docker
docker pull movesense/sensor-build-env:latest
I cloned the movesense repo using the below code
git clone git#bitbucket.org:suunto/movesense-device-lib.git
Then I moved to the cloned folder
cd movesense-device-lib
Then I started the docker image on the terminal
docker run -it --rm -v c:/My/Project/Folder/movesense-device-lib:/movesense:delegated movesense/sensor-build-env:latest
The docker prompted and I followed the below commands
cd /movesense
mkdir myBuild
cd myBuild
Now, I ran the CMake "Run the CMake (needs to be done only once unless you add files to the project). It's possible to build both the debug and release version. In both cases the command will contain the following:" by the following command
cmake -G Ninja -DMOVESENSE_CORE_LIBRARY=../MovesenseCoreLib/ -DCMAKE_TOOLCHAIN_FILE=../MovesenseCoreLib/toolchain/gcc-nrf52.cmake <sample_directory>
I created a sample folder as build1 and saved. In the place of sample_directory, I pasted "build" and executed the command.
But in return I get an error as
CMake Error: The source directory "/movesense/myBuild/build" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.
The objective is to create a project as zip file and run it in visual studio. Please help me to solve the issue. I've attached the links of the documents which I followed from movesense.
Movesense Set up document

The "<sample_directory>" should be a path to the folder where the firmware source code is (i.e. the sample app folder). If you create the build folder as /movesense/myBuild and cd into it, the path would be ../samples/blinky_app if you are building the blinky_app -sample.
Full disclosure: I work for the movesense team

Related

How to install the lustre client on Ubuntu nodes?

I am trying to install the lustre clients on Unbuntu 20.04 nodes I have in GCP. Im using linux kernel version 5.15.0-1021-gcp.
I'm trying to install the client with the following code:
cd /home/apps/
mkdir lustre
git clone git://git.whamcloud.com/fs/lustre-release.git
cd lustre-release
git checkout 2.15.0
sh autogen.sh
./configure --prefix=/home/apps/lustre --disable-server --enable-client ## doesnt run! Fails at ./configures with error message "error: Run make config in /lib/modules/5.15.0-1021-gcp/build"
make debs
The configure step fails with an error about running make config in /lib/modules/5.15.0-1021-gcp/build. I tried running make config in /lib/modules/5.15.0-1021-gcp/build but was asked to input some values that I was unsure of.
I also tried downloading the deb package of the client software at
https://downloads.whamcloud.com/public/lustre/lustre-2.15.0/ubuntu2004/client/lustre-client-modules-5.4.0-96-generic_2.15.0-1_amd64.deb. However this is for the wrong linux kernel and I'm not sure what env variables need to be set for this package.
Anyone know how to install the client modules for lustre on Ubuntu?
You need to have the kernel sources or kernel-devel package that exactly match the kernel that you are installing on. This should also include the .config file that describes all of the options used when building your kernel.
Alternately, you could try a pre-built package, but it isn't clear if this will install on your kernel or not.
https://build.whamcloud.com/job/lustre-b2_15/40/arch=x86_64,build_type=client,distro=ubuntu2204,ib_stack=inkernel/

Create-React-App "npm run build" results in partially populated build folder when run inside Docker container

I have an old project that I started by using Create React App to generate boilerplate. At some point down the line I "ejected" the project. Running npm run build successfully generates all of the expected build artifacts inside the /build folder when run on my dev machine and serving the build folder works perfectly.
Now I'm trying to Dockerize this app and have created the following Dockerfile
FROM node:16-alpine
WORKDIR /app
COPY package.json .
COPY package-lock.json .
ENV NODE_ENV production
RUN npm install
COPY . .
RUN npm run build
CMD [ "npx", "serve", "-l", "3000", "build" ]
I can build and run the image as a Docker container, and the build folder is served fine except that most of its contents are missing. The only two files present are favicon.ico and manifest.json. If I open a shell and list out the build folder it's the same. For some reason the webpack bundles, index.html, styles etc. are all missing.
I've been Googling around for hours but can't find anything. I can't even find out how to log the output of CRA's npm run build command to a file so that I can see the build log.
Can anyone give me a hint at where the problem might lie? Thanks

Add shell script as executable to catkin package to use with rosrun

When using a catkin package it is possible to start the c++ executables, that were added in the CMakeLists.txt, using the command rosrun <package_name> <executable_name> from anywhere on the computer.
Is there a way to add a shell script as an executable to the catkin package so that it can be called using rosrun <package_name> <script.sh>?
Yes it is. You can do this by performing the following steps:
You need to place your script in the scripts folder of your package. Also the script needs to be marked as executable (chmod +x your_script.sh).
After sourcing your workspace, you can run and launch the script with ROS tools like
rosrun your_package your_script.sh
Note that you need to add your script also to the CMakeLists.txt in case of installation:
install(PROGRAMS scripts/your_script.sh
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

Virtualenv and django not working in bash on windows 10

I have a problem with using virtualenv and django in bash. If I type python -m venv env in cmd, then env\Scripts\activate, and then virtualenv - I get 'virtualenv' is not recognized as an internal or external command, operable program or batch file.. If I do the same in bash I get bash: virtualenv: command not found. How do I fix this?
Try the following to resolve your issue.
Check all of the environment variables related to the software you require to be used at least.
Check the permissions for files and folders for the software.
Sometimes uninstalling and installing the software with issues can solve problems quickly.
If you have performed number 2. and you are still have errors, proceed to number 3.
You may have dependencies missing, a good tool i have used on Windows is Dependency Walker, and the software will check if any file and dependencies are missing, and you should be able to download them.
An error message may output a file is not found but in fact a dependency is missing, relating to the software you are trying to run.
Try the following steps in the terminal, it may solve your problem.
using terminal, mkdir to make a directory for your project
cd to your project folder/dir
type pip3 freeze, it will show up all the installed packages and dependencies on global scope/system
but we gonna have a venv where we will install our necessary packages and dependencies
type python3 -m venv ./venv to create venv inside your current project folder, please ensure you are inside the folder before running this command
[if you are not using python 3, then the command will be python -m venv ./venv]
to actiavte environment,
on mac, run source ./venv/bin/activate ||
on windows, run .\venv\Scripts\activate.bat [if it doesn't work, try to put your absolute path]
you can check what is installed inside venv using pip freeze, you will see nothing inside the venv
Now you can install django inside venv for your project
to deactivate the environment, just type deactivate

How to build setup executable for chromium from sources

How to build setup.exe or setup.dmg (for mac) of chromium browser?
I tried to read the build documentation but there is only information about how to build chromium and run it but not to build setup.exe
Setup is an executable file and you can create that file by running the following command:
ninja -C folder_to_output setup