Skip to content
Vertical components...
 
Notifications
Clear all

Vertical components not working with NavMeshAgent .move or .velocity?

1 Posts
1 Users
0 Likes
0 Views
Guest
Illustrious Member
Joined: 4 months ago
Posts: 57368
Topic starter  

$begingroup$

This is a weird one. I'm using a 2d adaptation of the NavMesh (found here: https://github.com/h8man/NavMeshPlus ) to get obstacle avoidance for my AI in my 2d game.

I also want to use it for my player controller, so that I can get collisions with walls for 'free' without having to use a box or circle collider and deal with any clipping issues. So currently my player component has a Rigidbody2d set to Kinematic, a circle collider (to register collisions with bullets etc.), and a Nav Mesh Agent component. In the Start method of my script, I was told to add these lines:

agent.updateRotation = false;
agent.updateUpAxis = false;

I used to use this method of moving the player (which also has vertical-movement jittery issues when paired with the Nav Mesh Agent):

transform.Translate(new Vector3(moveVal.x, moveVal.y, 0) * moveSpeed * Time.fixedDeltaTime, Space.World);

However I read that I'd want to set the agent's velocity to make it better suited to being avoided by enemy AI, if required. So I tried...

agent.velocity = new Vector3(moveVal.x, moveVal.y, 0) * moveSpeed;

Ok, this works... but it only works in the x direction. If I hit W or S on keyboard to move vertically, it does nothing. However, if I hold both vertical AND horizontal move keys down, it works! ...bizarre.

I did try this with joystick movement and it also worked fine, which is also bizarre. I logged out moveVal.x and moveVal.y for both control methods; the keyboard values were always either 1, 0, or -1, whereas the gamepad/joystick values were floats anywhere between -1 and 1. (I'm using new input system with an action type of Value and control type Vector2)

And yes, I did try commenting out the agent.updateUpAxis = false line since it did look suspicious to me too, but that didn't change anything unfortunately.

$endgroup$


   
Quote

Unreplied Posts

Is $ mu(E times F) leq nu(E times F) forall (E,F) implies mu(A) leq nu(A) forall A in mathcal{E} otimes mathcal{F} $ true?

$begingroup$

Let $(X,mathcal{E})$ and $(Y,mathcal{F})$ denote two measurable spaces and let $mu,nu$ denote two finite measures on $(X times Y, mathcal{E} otimes mathcal{F})$, where $mathcal{E} otimes mathcal{F}:= sigma(mathcal{E} times mathcal{F})$. Consider the claim

$$
mu(E times F) leq nu(E times F) text{ for all } (E,F) in mathcal{E} times mathcal{F} implies mu(A) leq nu(A) text{ for all } A in mathcal{E} otimes mathcal{F}.
$$

Question: Is this claim true?


Attempt:

Define the set $$
M = {A in mathcal{E} otimes mathcal{F} colon mu(A) leq nu(A)}.
$$

Then we want to show that $M = mathcal{E} otimes mathcal{F}$. Note that clearly $M subseteq mathcal{E} otimes mathcal{F}$. For the other inclusion, we have by assumption that $mathcal{E} times mathcal{F} subseteq M$ so it follows that $mathcal{E} otimes mathcal{F}= sigma(mathcal{E} times mathcal{F}) subseteq sigma (M)$ and hence it would suffice to show $M$ is a $sigma$-algebra.

However I am not sure this is the case. I can’t seem to show that $M$ is closed under complements and countable unions. In particular say for the union part, we can do the following:
$$
mu(bigcup_{n in mathbb{N}}A_n) leq sum_{n in mathbb{N}} mu(A_n) leq sum_{n in mathbb{N}} nu(A_n),
$$

but then we cannot go back to $nu(bigcup_{n in mathbb{N}}A_n)$. So this is where I am stuck.

I have also tried to look at Dynkin’s $pi$-theorem but at least I could not see how this was useful here.

Also I haven’t been able to come up with any counterexample yet.


As a final remark, I will just need to apply this result for $mathcal{E},mathcal{F} = mathcal{B(mathbb{R}^d}),mathcal{B(mathbb{R}^m})$ but I would like to prove it higher generality if this is indeed possible. If this is not possible, are there any conditions we can impose for it to hold? Any feedback/help is much appreciated!

$endgroup$

Problem to define a key and the associated value of a table from a variable

I’m sorry for the imprecision of my question but I couldn’t find a way to describe my problem correctly.

I created a new package and in the “lua” part, I use two classes, one for points and the other for lines. Two tables z and L are associated to these classes. In the first one are stored the points and in the second the lines.
For example for points z.a = point: new (1,2). This defines the point a whose affix (complex number) is 1+2i. In the table here the key is a and the value 1+2i . In the same way if a and b are defined, I can define a line with for example L.a__b = line: new (z.a,z.b). This is a bit more complicated because tables are stored in a table.

I may be wrong but I think my problem can be translated like this:
If x=a and y=b then how do I define a function that gives me L.a__b = line: new (z.a,z.b), L.x__y etc. gives nothing.

The package can be found on this page tkz-elements. You will find in the archive the code of tkz-elements a readme and a small documentation and several examples. All this is still experimental!

Here is the more complete code:

documentclass{article}
usepackage{tkz-euclide}
usepackage{tkz-elements}
begin{document}
parindent = 0pt

begin{elements}
z.a = point: new (0, -1)
z.b = point: new (4, 2)
z.c = point: new (1, 2)
z.d = point: new (-1, 3)
L.a__b = line: new (z.a,z.b)
L.a__d = line: new (z.a,z.d)
L.d__b = line: new (z.d,z.b)
-- L.c__d = line: new (z.c,z.d)
-- z.i =intersection_ll_ (L.a__b,L.c__d)

va = tostring(c__d)
 for i in pairs(L) do
   if i == va then 
   else
      _, _,ft, sd = string.find( "c__d", "(.+)__(.+)" )    
      L["ft__sd"] = line: new (z.ft,z.sd)  -- wrong !
      --  tex.print(ft..'__'..sd)   -- to show the values of ft and sd
     break
   end
 end

 -- the next code is here to show the different values
for i,k in pairs(L) do
 tex.print(tostring(k)..";"..tostring(i))
 for u,v in pairs(k)  
    do 
       tex.print(tostring(v)) 
  end
 tex.print('\\')
 end
end{elements}

begin{tikzpicture}
 tkzGetNodes

 tkzDrawLines[add=1 and 1](a,b c,d)
 tkzDrawPoints(a,b,c,d)
tkzLabelPoints(a,b,c,d)
end{tikzpicture}
end{document}

Some explanations: 4 points are defined then 4 lines but I commented the last one L.c__d to show my problem.
The code allows to get the intersection of two lines if they are defined. I would like to find a test to know if one of them is not defined and in this case create it automatically.
Having commented L.c__d = line: new (z.c,z.d) this line is no longer defined. So I parse the expression representing this line with the string.find function and get ft and sd which point to c and d.

Question: How can I use ft and sd to get L.c__d = line: new (z.c,z.d)?

enter image description here

AppImage .desktop file not showing on dock

I’m on Ubuntu 22.04.2 LTS.
I have two .desktop executable files for the Keet AppImage in my .local/share/applications folder.
I didn´t create them they have been created by the app I suppose.
However they are both not showing on my dock (I have Dash to Dock installed).
All the others AppImages are showing.
If I run them form the terminal with gtk-launch keet or gtk-launch appimagekit_8d9752879526b100ab8504901c9bd0a4-Keet the app starts succesfully.
Removing one of the two files and restarting the system does not fix the issue.
What can be the reason and how can I solve the issue?
The content of the files is:

[Desktop Entry]
Name=Keet
Exec=/home/giovanni/snap/Keet_7695b52a4e54b87f751f760f6ab65255.AppImage %U
Terminal=false
Icon=keet
Type=Application
StartupWMClass=Keet
X-AppImage-Version=1.0.1
Comment=Keet
MimeType=x-scheme-handler/punch;x-scheme-handler/holepunch

and :

[Desktop Entry]
Name=Keet
Exec=/home/giovanni/snap/Keet_7695b52a4e54b87f751f760f6ab65255.AppImage
Icon=appimagekit_8d9752879526b100ab8504901c9bd0a4_keet
Type=Application
Categories=Network;AudioVideo;

TryExec=/home/giovanni/snap/Keet_7695b52a4e54b87f751f760f6ab65255.AppImage
X-AppImage-Old-Icon=keet
X-AppImage-Identifier=8d9752879526b100ab8504901c9bd0a4
Actions=Remove;
X-AppImageLauncher-Version=2.2.0 (git commit 0f91801), built on 2020-09-29 21:36:15 UTC

How to install Ubuntu server 20.04 with UEFI (non gui)

I have done this before but the current ISO installer does not match my notes from previous installs.

ISO: ubuntu-20.04.5-live-server-amd64 using non gui installer via idrac.

get to disk partitioning
select disk
enter image description here

the only option is to add a GPT partition

enter image description here

and no option to format as ESP.

How should I create a /boot partition for UEFI?

All the stuff I turned up in searching used the GUI install where the dialogue was different.

Elements of the coset G/H, where G=$GL^+$(2) and H=SO(2)

$begingroup$

In this paper1 in section 2, a method to write the elements of the coset of G/H is provided for GL(4), but I am interested in $GL^+$(2).

My matrix representation of $mathfrak{gl}(2)$ is

$$
begin{bmatrix}
a+x& -b+y\
b+y & a-x
end{bmatrix}
$$

My matrix representation of $mathfrak{so}(2)$ is

$$
begin{bmatrix}
0& -b\
b & 0
end{bmatrix}
$$


Reading the paper, it states that the element g of G can be decomposed as g=$gamma$h, where

$$
gamma = exp left( begin{bmatrix}
a+x& +y\
y & a-x
end{bmatrix} right) in G/H
$$

and where

$$
h = exp left( begin{bmatrix}
0& -b\
b & 0
end{bmatrix} right) in H
$$

Is this correct, or no?

I am suspicious of the argument, because to me

$$
exp left( begin{bmatrix}
a+x& y\
y & a-x
end{bmatrix} right)exp left( begin{bmatrix}
0& -b\
b & 0
end{bmatrix} right) neq exp left( begin{bmatrix}
a+x& -b+y\
b+y & a-x
end{bmatrix} right)
$$

Thus, $gamma h$ does not appear to realize all elements of $G$. Or do we not care about some missing elements for cosets?

$endgroup$

Project not working after moving to WSL directory

My dockerized Lumen project had slow response time so according to advices I moved my project from my classic path C:Mgrlumen_laravellumenmysql to wsl.localhostUbuntuhomesamolumenmysql, then created Z: drive so I can open terminal in that location and run “docker-compose up -d”.
In previous adress it was working.I didnt change any code and have got error. Any advices? Thank you.

error in docker

2023-03-21 22:49:00 AH00112: Warning: DocumentRoot [/var/www/html/public] does not exist

According to docker inspect Mount info it exists

/VAR/WWW/HTML Z:homesamolumenmysql

docker-compose.yml

version: '3.8'

services:


   mysqldb:
    image: mysql:5.7
    container_name : mysqldb
    restart: always
    volumes:
      - ${DOCKER_MYSQL_VOLUME:-/opt/db_data}:/var/lib/mysql
    ports:
      - "3306:3306"
    environment:
     MYSQL_DATABASE: diplomovka
     MYSQL_ROOT_PASSWORD: 1234

   phpmyadmin:
     image: phpmyadmin/phpmyadmin
     container_name: phpmyadmin
     environment:
       PMA_HOST: mysqldb
       DB_READ_HOST: mysqldb
     ports:
       - "3400:80"
     depends_on:
       - mysqldb

   app:
     container_name: Lumen
     build:
       context: .
       dockerfile: Dockerfile
     volumes:
       - ./:/var/www/html
     restart: ${DOCKER_RESTART_POLICY:-always}
     ports:
       - "9000:80"
     working_dir: /var/www/html
     environment:
       MYSQL_HOST: mysqldb
       MYSQL_USER: root
       MYSQL_PASSWORD: 1234
       MYSQL_PORT: 3306

vhost.conf

<VirtualHost *:80>
    ServerName localhost

    DocumentRoot /var/www/html/public

    <Directory "/var/www/html">
        AllowOverride all
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Dockerfile

FROM php:7.4.19-apache

WORKDIR /var/www/html

RUN apt-get update && apt-get install -y  
        zlib1g-dev 
        libzip-dev 
        libonig-dev 
        curl 

    && docker-php-ext-install pdo_mysql 
    && docker-php-ext-install mysqli 
    && docker-php-source delete

COPY ./vhost.conf /etc/apache2/sites-available/000-default.conf

COPY ./ ./

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN chown -R www-data:www-data /var/www/html 
    && a2enmod rewrite

RUN cd /var/www/html && composer install && php artisan key:generate

Using Root Test to see whether $sum_{n=1}^{infty}frac{n^{n+frac{1}{n}}}{(n+frac{1}{n})^{n}}$ converges

$begingroup$

This exercise specifically requires that we use the root test to determine whether the series converges or not.

All I’ve done so far is get the sequence in this form:
$$sqrt[n] frac{n^{n+frac{1}{n}}}{(n+frac{1}{n})^{n}} = sqrt frac{n^{(1+n^{-2})n}}{(n+frac{1}{n})^n}=frac{n^{1+n^{-2}}}{n+frac{1}{n}} = frac{n^{frac{n^2+1}{n^{2}}}}{n^{2}+1}$$

But, I’m not even sure if I’m on the right track here. Any guidance is appreciated.

Edit: I showed my effort. I didn’t tell anyone to solve it for me. Not sure why the downvotes..

$endgroup$

curious GoldenRatio identity

$begingroup$

I would like to verify the following identity but I don’t know how mathematics says that it is equal to numerically.
$$prod _{k=0}^{infty } sqrt{frac{phi ^{2^{-k-1}} left(phi ^{2^{-k}}+1right)}{phi ^{2^{1-k}}+1}}=frac{sqrt{2}}{sqrt[4]{5}}$$

$endgroup$

induction on summation with factorial

$begingroup$

Let $P(k, n) : exists b_{1}, b_{2}, …, b_{n} in mathbb{N}, (forall i in mathbb{Z^+}, 1 leq i leq k implies b_{i} leq i) land(k = sum limits _{i=1}^n b_{i} cdot i!)$ where $k in mathbb{N}$ and $n in mathbb{Z^+}$.

How to show with induction $forall k in mathbb{N}, forall n in mathbb{N^+}, k < (n+1)! implies P(k,n)$

Any suggestions and hints would be appreciated.

$endgroup$

How to repair an XFS volume in a RAID array

In a data server, we have a RAID array of 5 disks joined in an XFS filesystem. The dmesg output is:

IPv6: ADDRCONF(NETDEV_CHANGE): enp134s0f0: link becomes ready
XFS (sda2): Mounting V5 Filesystem
XFS (sda2): failed to locate log tail
XFS (sda2): log mount/recovery failed: error -74
XFS (sda2): log mount failed
clocksource: timekeeping watchdog on CPU21: hpet retried 2 times before success
clocksource: timekeeping watchdog on CPU22: hpet retried 2 times before success
clocksource: timekeeping watchdog on CPU5: hpet retried 2 times before success
clocksource: timekeeping watchdog on CPU23: hpet retried 2 times before success
clocksource: timekeeping watchdog on CPU4: hpet retried 3 times before success
clocksource: timekeeping watchdog on CPU19: hpet retried 2 times before success
clocksource: timekeeping watchdog on CPU10: hpet retried 2 times before success
clocksource: timekeeping watchdog on CPU6: hpet retried 2 times before success
clocksource: timekeeping watchdog on CPU0: hpet retried 2 times before success
usb 1-2.5: USB disconnect, device number 5

and the output of xfs_repair /dev/sda2 is:

bad hash table for directory inode 66571995395 (no data entry): rebuilding
rebuilding directory inode 66571995395
entry ".." in directory inode 66571995396 points to non-existent inode 60129542274
bad hash table for directory inode 66571995396 (no data entry): rebuilding
rebuilding directory inode 66571995396
entry ".." in directory inode 66571995397 points to non-existent inode 4294967426
bad hash table for directory inode 66571995397 (no data entry): rebuilding
rebuilding directory inode 66571995397
Metadata corruption detected at 0x5566785ce66f, inode 0xf80000910 dinode

fatal error -- couldn't map inode 66571995408, err = 117

I will appreciate any help or hint.

Share: