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

v2.8.0 bug fix #438

Merged
merged 3 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions drone_physics/body_physics.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#ifndef _BODY_PHYSICS_HPP_
#define _BODY_PHYSICS_HPP_


#ifdef WIN32
#define _USE_MATH_DEFINES
#include <cmath>
#else
#include <cmath>
#endif



#ifdef BP_INCLUDE_IO /* for printint out */
#include <iostream>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


python camera.py ..\DroneAppWin\custom.json

python camera.py ..\DroneAppWin\custom.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


python rc-custom.py ..\DroneAppWin\custom.json rc_config/hori4mini-control-win.json

python rc-custom.py ..\DroneAppWin\custom.json rc_config/hori4mini-control-win.json
8 changes: 4 additions & 4 deletions tools/win/template/hakoniwa-px4-win/hakoniwa/apps/run-rc.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


python rc.py ..\DroneAppWin\custom.json

python rc.py ..\DroneAppWin\custom.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


python sample.py ..\DroneAppWin\custom.json

python sample.py ..\DroneAppWin\custom.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
@echo off
setlocal

set "HAKO_CUSTOM_JSON_PATH=..\DroneAppWin\custom.json"
set "DRONE_CONFIG_PATH=..\config_fc"
set "HAKO_CONTROLLER_PARAM_FILE=..\drone_control\config\param-api-mixer.txt"

if not exist "%HAKO_CUSTOM_JSON_PATH%" (
echo ERROR: can not find "%HAKO_CUSTOM_JSON_PATH%"
exit /b 1
)

if not exist "%DRONE_CONFIG_PATH%\" (
echo ERROR: can not find "%DRONE_CONFIG_PATH%"
exit /b 1
)

if not exist "%HAKO_CONTROLLER_PARAM_FILE%" (
echo ERROR: can not find "%HAKO_CONTROLLER_PARAM_FILE%"
exit /b 1
)

REM create_mmap.bat を呼び出す
call create_mmap.bat

..\..\out\build\x64-Release\hakoniwa\src\hako-px4sim.exe 127.0.0.1 4560 ext

popd

endlocal
@echo off
setlocal
set "HAKO_CUSTOM_JSON_PATH=..\DroneAppWin\custom.json"
set "DRONE_CONFIG_PATH=..\config_fc"
set "HAKO_CONTROLLER_PARAM_FILE=..\drone_control\config\param-api-mixer.txt"
if not exist "%HAKO_CUSTOM_JSON_PATH%" (
echo ERROR: can not find "%HAKO_CUSTOM_JSON_PATH%"
exit /b 1
)
if not exist "%DRONE_CONFIG_PATH%\" (
echo ERROR: can not find "%DRONE_CONFIG_PATH%"
exit /b 1
)
if not exist "%HAKO_CONTROLLER_PARAM_FILE%" (
echo ERROR: can not find "%HAKO_CONTROLLER_PARAM_FILE%"
exit /b 1
)
REM create_mmap.bat を呼び出す
call create_mmap.bat
..\..\out\build\x64-Release\hakoniwa\src\hako-px4sim.exe 127.0.0.1 4560 ext
popd
endlocal
68 changes: 34 additions & 34 deletions tools/win/template/hakoniwa-px4-win/hakoniwa/bin/run-PX4Control.bat
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
@echo off
setlocal

set "HAKO_CUSTOM_JSON_PATH=..\DroneAppWin\custom.json"
set "DRONE_CONFIG_PATH=..\config_px4"

if not exist "%HAKO_CUSTOM_JSON_PATH%" (
echo ERROR: can not find "%HAKO_CUSTOM_JSON_PATH%"
exit /b 1
)

if not exist "%DRONE_CONFIG_PATH%\" (
echo ERROR: can not find "%DRONE_CONFIG_PATH%"
exit /b 1
)

REM create_mmap.bat を呼び出す
call create_mmap.bat

for /f "tokens=3" %%a in ('netsh interface ip show address "vEthernet (WSL)" ^| findstr "IP Address"') do set "WSL_IP=%%a"

if not defined WSL_IP (
echo WSL IP address could not be found.
exit /b 1
)

echo WSL IP Address: %WSL_IP%


..\..\out\build\x64-Release\hakoniwa\src\hako-px4sim.exe %WSL_IP% 4560 sim

popd

endlocal
@echo off
setlocal
set "HAKO_CUSTOM_JSON_PATH=..\DroneAppWin\custom.json"
set "DRONE_CONFIG_PATH=..\config_px4"
if not exist "%HAKO_CUSTOM_JSON_PATH%" (
echo ERROR: can not find "%HAKO_CUSTOM_JSON_PATH%"
exit /b 1
)
if not exist "%DRONE_CONFIG_PATH%\" (
echo ERROR: can not find "%DRONE_CONFIG_PATH%"
exit /b 1
)
REM create_mmap.bat を呼び出す
call create_mmap.bat
for /f "tokens=3" %%a in ('netsh interface ip show address "vEthernet (WSL)" ^| findstr "IP Address"') do set "WSL_IP=%%a"
if not defined WSL_IP (
echo WSL IP address could not be found.
exit /b 1
)
echo WSL IP Address: %WSL_IP%
..\..\out\build\x64-Release\hakoniwa\src\hako-px4sim.exe %WSL_IP% 4560 sim
popd
endlocal
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
@echo off
setlocal

set "HAKO_CUSTOM_JSON_PATH=..\DroneAppWin\custom.json"
set "DRONE_CONFIG_PATH=..\config_rc"
set "HAKO_CONTROLLER_PARAM_FILE=..\drone_control\config\param-api-mixer.txt"

if not exist "%HAKO_CUSTOM_JSON_PATH%" (
echo ERROR: can not find "%HAKO_CUSTOM_JSON_PATH%"
exit /b 1
)

if not exist "%DRONE_CONFIG_PATH%\" (
echo ERROR: can not find "%DRONE_CONFIG_PATH%"
exit /b 1
)

if not exist "%HAKO_CONTROLLER_PARAM_FILE%" (
echo ERROR: can not find "%HAKO_CONTROLLER_PARAM_FILE%"
exit /b 1
)

REM create_mmap.bat を呼び出す
call create_mmap.bat

..\..\out\build\x64-Release\hakoniwa\src\hako-px4sim.exe 127.0.0.1 4560 ext

popd

endlocal
@echo off
setlocal
set "HAKO_CUSTOM_JSON_PATH=..\DroneAppWin\custom.json"
set "DRONE_CONFIG_PATH=..\config_rc"
set "HAKO_CONTROLLER_PARAM_FILE=..\drone_control\config\param-api-mixer.txt"
if not exist "%HAKO_CUSTOM_JSON_PATH%" (
echo ERROR: can not find "%HAKO_CUSTOM_JSON_PATH%"
exit /b 1
)
if not exist "%DRONE_CONFIG_PATH%\" (
echo ERROR: can not find "%DRONE_CONFIG_PATH%"
exit /b 1
)
if not exist "%HAKO_CONTROLLER_PARAM_FILE%" (
echo ERROR: can not find "%HAKO_CONTROLLER_PARAM_FILE%"
exit /b 1
)
REM create_mmap.bat を呼び出す
call create_mmap.bat
..\..\out\build\x64-Release\hakoniwa\src\hako-px4sim.exe 127.0.0.1 4560 ext
popd
endlocal
48 changes: 24 additions & 24 deletions tools/win/template/hakoniwa-px4-win/hakoniwa/bin/run-replay.bat
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
@echo off
setlocal

set "HAKO_CUSTOM_JSON_PATH=..\DroneAppWin\custom.json"
set "DRONE_CONFIG_PATH=..\config_rc"

if not exist "%HAKO_CUSTOM_JSON_PATH%" (
echo ERROR: can not find "%HAKO_CUSTOM_JSON_PATH%"
exit /b 1
)

if not exist "%DRONE_CONFIG_PATH%\" (
echo ERROR: can not find "%DRONE_CONFIG_PATH%"
exit /b 1
)

REM create_mmap.bat を呼び出す
call create_mmap.bat

..\..\out\build\x64-Release\hakoniwa\src\hako-px4sim.exe 127.0.0.1 4560 replay

popd

endlocal
@echo off
setlocal
set "HAKO_CUSTOM_JSON_PATH=..\DroneAppWin\custom.json"
set "DRONE_CONFIG_PATH=..\config_rc"
if not exist "%HAKO_CUSTOM_JSON_PATH%" (
echo ERROR: can not find "%HAKO_CUSTOM_JSON_PATH%"
exit /b 1
)
if not exist "%DRONE_CONFIG_PATH%\" (
echo ERROR: can not find "%DRONE_CONFIG_PATH%"
exit /b 1
)
REM create_mmap.bat を呼び出す
call create_mmap.bat
..\..\out\build\x64-Release\hakoniwa\src\hako-px4sim.exe 127.0.0.1 4560 replay
popd
endlocal
Loading