PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.59k stars 13.56k forks source link

[Bug] Error with running sims on Gazebo models: ninja: error: unknown target 'gz_x500' make: *** [Makefile:232: px4_sitl] Error 1 #23260

Open ashishp166 opened 5 months ago

ashishp166 commented 5 months ago

Describe the bug

I am trying to run make px4_sitl gz_x500 or make px4_sitl gz_x500_depth, but there seems to be an issue of ninja: error: unknown target 'gz_x500'. I have tried other models also and none of them seem to be working. I made sure to restart at all the spots mentioned on the official documentation for the setup of ROS2 with PX4 Autopilot.

Full Log:


-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.10.12", minimum required is "3")
-- PX4 config file: /home/{user}/PX4-Autopilot/boards/px4/sitl/default.px4board
-- PLATFORM posix
-- ROMFSROOT px4fmu_common
-- ROOTFSDIR .
-- TESTING y
-- ETHERNET y
-- PX4 config: px4_sitl_default
-- PX4 platform: posix
-- PX4 lockstep: enabled
-- The CXX compiler identification is GNU 11.4.0
-- The C compiler identification is GNU 11.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/gcc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- cmake build type: RelWithDebInfo
/usr/bin/python3: Error while finding module specification for 'symforce.symbolic' (ModuleNotFoundError: No module named 'symforce')
-- Could NOT find gz-transport (missing: gz-transport_DIR)
-- Could NOT find gz-transport (missing: gz-transport_DIR)
-- Found Java: /usr/bin/java (found version "11.0.23")
-- ROMFS: ROMFS/px4fmu_common
Architecture:  arm64
==> CPACK_INSTALL_PREFIX = @DEB_INSTALL_PREFIX@
-- Configuring done
-- Generating done
-- Build files have been written to: /home/{user}/PX4-Autopilot/build/px4_sitl_default
ninja: error: unknown target 'gz_x500'
make: *** [Makefile:232: px4_sitl] Error 1```

### To Reproduce

1. git clone https://github.com/PX4/PX4-Autopilot.git --recursive
2. bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
3. (Restart the computer on completion)
4. make distclean
5. export CC=gcc
7. export CXX=g++
8. git submodule update --init --recursive
9. (Check model located at: ls Tools/simulation/gz/models)
10. make px4_sitl gz_x500

### Expected behavior

N/A

### Screenshot / Media

_No response_

### Flight Log

N/A

### Software Version

I'm using the [last version of px4](https://github.com/PX4/PX4-Autopilot/tree/main)
OS: Ubuntu 22.04
Jammy

### Flight controller

N/A

### Vehicle type

None

### How are the different components wired up (including port information)

_No response_

### Additional context

_No response_
Noe-Sanchez commented 5 months ago

pip install symforce

Noe-Sanchez commented 5 months ago

That should fix it

sanaosheng commented 3 months ago

That should fix it

why my error is same to him completely,and I pip install symforce successfully,after that ,I try again ,but the error doesn't change.

Collin-Emerson-Miller commented 1 month ago

Same here, tried the pip install. No Dice.

wangzy-dbug commented 1 month ago

Did you solve this problem?i meet same sitiuation,and i installed symforce,but it changed nothing

leechor commented 1 month ago

I have the same problem

Noe-Sanchez commented 4 weeks ago

@ashishp166 @sanaosheng @Collin-Emerson-Miller @wangzy-dbug The problem may be caused due to running make distclean on the repo, or not having recursively cloned all submodules for simulation. Try doing git submodule update --init --recursive and try to build again. If the problem persists, try a new installation on the same machine.