aiegoo / jdlab-setup

0 stars 0 forks source link

server issues #4

Open aiegoo opened 2 years ago

aiegoo commented 2 years ago

I will keep track of issues here

Main features I am installing on this server are something I used until a year ago on Digital Ocean, which I recently redeployed for this purpose. Currently the target server ip is 211.229.70.180 with port -9989 open for ssh connection. And the DO server I've redeployed has ip of 159.223.44.226. VIM, Tmux and Install.sh I've kept there are the ones I am trying to set up here on the target server.

install.sh

#Install git, vim and other tools for Conda 

sudo apt update && sudo apt install -y git vim

#Make Anaconda Installer executable and run it under silent mode (without prompts)

chmod +x Anaconda3-2019.10-Linux-x86_64.sh
./Anaconda3-2019.10-Linux-x86_64.sh -b -p $HOME/anaconda3 -f

#Copy everything from the Contents folder into the home folder for the user.

cp -rT Contents/. $HOME/
cd $HOME

#Add Conda to PATH so you can use Conda commands like [conda activate]

echo "export PATH=~/anaconda3/bin:$PATH" >> .bashrc
source .bashrc

#Install pip package manager for Python via Conda. Currently for Python 3 only.

conda install pip
conda activate

#Install necessary libraries for tensorflow

pip install setuputils typed-ast && pip install --user setuputils typed-ast

#Update the python kernel (version) for the Jupyter Notebook

pip install ipykernel && pip install --user ipykernel
python3 -m ipykernel install && python3 -m ipykernel install --user

#Install remaining packages specified in requirements.txt

pip install -r requirements.txt && pip install --user -r requirements.txt
aiegoo commented 2 years ago

image this is what I meant by, when I said some shell shows aiegoo@tonylee and another shell is aiegoo. How is it different? my idea is that powerline fonts has removed the special characters and also removed the host name

aiegoo commented 2 years ago

Another issue is tonylee is the host name, then is it possible to combine that with ip address so that when I access my pc from remote, i can use aiegoo@hostname?

solisgonz commented 2 years ago

If you prefer to have prompt like 'aiegoo@tonylee:/$' (meaning user@hostname:path$) for all users, then you need to edit .bashrc for each user and modify PS1 definition. Easy way is to get PS1 definition from the user that you like, and copy that definition for the other user. For example, in my case:

mario@server:~$ echo $PS1 [\e]0;\u@\h: \w\a]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ mario@server:~$

So, setting PS1 to that will give you user@hostname like prompt.

mbergotto commented 2 years ago

Sorry I don't know why the previous entry was logged with that user... that's not me, it's a customer account. If you prefer to have prompt like 'aiegoo@tonylee:/$' (meaning user@hostname:path$) for all users, then you need to edit .bashrc for each user and modify PS1 definition. Easy way is to get PS1 definition from the user that you like, and copy that definition for the other user. For example, in my case:

mario@server:$ echo $PS1 [\e]0;\u@\h: \w\a]${debian_chroot:+($debian_chroot)}\u@\h:\w$ mario@server:$

So, setting PS1 to that will give you user@hostname like prompt.

aiegoo commented 2 years ago

ps -elf | grep nginx

ss -anp | grep 443 | grep -i listen

image

ss -anp | grep 80 | grep -i listen image

sudo iptables -L image

aiegoo commented 2 years ago

I have issues with px4 gazebo this is the link with simulation example (https://docs.px4.io/master/en/simulation/gazebo.html), but I have issues like here image

Also I'd like create a short cut for exe files... such as QGround.... MissionPlanner. APMPlanner, and to the folder where I can run the script. such as sim_vehicle ...

mbergotto commented 2 years ago

Hi ! Regardig that error, it looks like some variable that should contain only a directory pointing the folder where CMakeCache.txt file , actually has the full path including the file. That's causing the error. I'll be online again after my 16:00. Very sorry not being able to sync with you in a more dynamic way, but the time difference is really big :-(

BR Mario

On Wed, 16 Feb 2022 at 05:40, tonyleekorea @.***> wrote:

I have issues with px4 gazebo this is the link with simulation example ( https://docs.px4.io/master/en/simulation/gazebo.html), but I have issues like here [image: image] https://user-images.githubusercontent.com/42961200/154226871-1ba9c139-8b51-440e-8f72-b1240be54743.png

Also I'd like create a short cut for exe files... such as QGround.... MissionPlanner. APMPlanner, and to the folder where I can run the script. such as sim_vehicle ...

— Reply to this email directly, view it on GitHub https://github.com/aiegoo/jdlab-setup/issues/4#issuecomment-1041245320, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWPS3DTOQV25JTINZ2V5WV3U3NPJHANCNFSM5OMWHGWQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

mbergotto commented 2 years ago

Please try this, already done in my laptop and working fine:

cd rm -rf PX4-Autopilot git clone https://github.com/PX4/PX4-Autopilot.git --recursive bash ./PX4-Autopilot/Tools/setup/ubuntu.sh

do reboot or at least logout / login

cd PX4-Autopilot make px4_sitl gazebo

Please let me know!

BR

On Wed, 16 Feb 2022 at 09:24, Mario Bergotto @.***> wrote:

Hi ! Regardig that error, it looks like some variable that should contain only a directory pointing the folder where CMakeCache.txt file , actually has the full path including the file. That's causing the error. I'll be online again after my 16:00. Very sorry not being able to sync with you in a more dynamic way, but the time difference is really big :-(

BR Mario

On Wed, 16 Feb 2022 at 05:40, tonyleekorea @.***> wrote:

I have issues with px4 gazebo this is the link with simulation example ( https://docs.px4.io/master/en/simulation/gazebo.html), but I have issues like here [image: image] https://user-images.githubusercontent.com/42961200/154226871-1ba9c139-8b51-440e-8f72-b1240be54743.png

Also I'd like create a short cut for exe files... such as QGround.... MissionPlanner. APMPlanner, and to the folder where I can run the script. such as sim_vehicle ...

— Reply to this email directly, view it on GitHub https://github.com/aiegoo/jdlab-setup/issues/4#issuecomment-1041245320, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWPS3DTOQV25JTINZ2V5WV3U3NPJHANCNFSM5OMWHGWQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

aiegoo commented 2 years ago

-- Configuring incomplete, errors occurred! See also "/home/aiegoo/src/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeOutput.log". See also "/home/aiegoo/src/PX4-Autopilot/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeError.log". [362/853] Building CXX object src/...ommander.dir/esc_calibration.cpp.o FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-configure cd /home/aiegoo/src/PX4-Autopilot/build/px4_sitl_default/build_gazebo && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSEND_ODOMETRY_DATA=ON -DGENERATE_ROS_MODELS=ON -GNinja /home/aiegoo/src/PX4-Autopilot/Tools/sitl_gazebo && /usr/bin/cmake -E touch /home/aiegoo/src/PX4-Autopilot/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure [384/853] Building CXX object src/...les__commander.dir/Commander.cpp.o ninja: build stopped: subcommand failed. Makefile:235: recipe for target 'px4_sitl' failed make: *** [px4_sitl] Error 1

building from source

help to try to fix the python path issue.. as I was trying to build from source

image

aiegoo commented 2 years ago

Different approach

as explained here

Running step 2 (source ubuntu.sh) has produced the following stdout

Setting up gazebo9-plugin-base (9.19.0-1~bionic) ...
Setting up libgazebo9-dev:amd64 (9.19.0-1~bionic) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

Reboot or logout, login computer before attempting to build NuttX targets

and in the ensuing step, it asks if my system has right version of gcc arm-none-eabi-gcc --version

raspi

I don't know what to make of this instructions of the page I have linked to

ROS/Gazebo

I have replaced the source file as the link is no longer available. wget https://raw.githubusercontent.com/PX4/Devguide/v1.9.0/build_scripts/ubuntu_sim_ros_melodic.sh

this link will install the script.

aiegoo commented 2 years ago

Aftermath

I got two issues at this stage;

One. after I ran build script, it seems okay, except that it says ' cd ./src/Firmware not found`, I don't see any Firmware subdirectory in src, not on my pc or PX4 official github repo.... so I wonder.....

Another issue issue is when  I ran `make px4_sitl jmavsim`, the build seems successful but it hang and produced the following stdout;
BUILD SUCCESSFUL
Total time: 1 second
Options parsed, starting Sim.
Starting GUI...
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
    at java.base/java.lang.Runtime.load0(Runtime.java:768)
    at java.base/java.lang.System.load(System.java:1837)
    at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
    at java.base/java.lang.

ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
    at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
    at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2648)
    at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
    at java.base/java.lang.System.loadLibrary(System.java:1873)
    at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1399)
    at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1397)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1396)
    at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1429)
    at java.desktop/java.awt.Component.<clinit>(Component.java:621)
    at me.drton.jmavsim.Simulator.<init>(Simulator.java:193)
    at me.drton.jmavsim.Simulator.main(Simulator.java:944)
    ... 5 more

jmavsim jdk

Viola!!!

aiegoo commented 2 years ago

image

image

aiegoo commented 2 years ago

shortcut

As I mentioned earlier, I need execute files to call from the cli.. is the below one of the way?

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
source /opt/ros/kinetic/setup.bash
source /home/leewoongwon/ros_catkin_ws/devel/setup/bash
aiegoo commented 2 years ago

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether a8:a1:59:b3:36:a3 brd ff:ff:ff:ff:ff:ff inet 192.168.1.3/24 brd 192.168.1.255 scope global dynamic noprefixroute enp0s31f6 valid_lft 66788sec preferred_lft 66788sec inet6 fe80::99b1:5b1f:419a:490a/64 scope link noprefixroute valid_lft forever preferred_lft forever 3: wlx00266649547e: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:26:66:49:54:7e brd ff:ff:ff:ff:ff:ff inet 192.168.1.4/24 brd 192.168.1.255 scope global dynamic noprefixroute wlx00266649547e valid_lft 72622sec preferred_lft 72622sec inet6 fe80::10ee:bc13:238e:d5e8/64 scope link noprefixroute valid_lft forever preferred_lft forever 4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default link/ether 02:42:f9:92:2e:1b brd ff:ff:ff:ff:ff:ff inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0 valid_lft forever preferred_lft forever

aiegoo commented 2 years ago

image

aiegoo commented 2 years ago

[cloud-app] url = http://java.eggs.or.kr ip = 192.168.0.2 control-port = 1314 video-port = 1313 max-reconnection-attempts = 180

this is a device setting to connect to java.eggs.or.kr which has codes on my pc that controls the devices and listens to the port for connection.

aiegoo commented 2 years ago

I got some issues and a question about shortcuts

image

I remember you said something about how to use this.. cd and cdp or something... As you can see in the image above, it doesn't seem to work.. let me know how to fix