Open Smashroom opened 1 year ago
I have a similar issue and am still solving the issue.
I guess one reason is the newest version PX4-Autopilot change the setup_gazebo.bash location. Thus we have to change the bashrc file like this
source ~/px-ws/src/PX4-Autopilot/Tools/simulation/gazebo/setup_gazebo.bash ~/px-ws/src/PX4-Autopilot ~/px-ws/src/PX4-Autopilot/build/px4_sitl_default
I have same issue on docker image px4io/px4-dev-ros-noetic
. Without mounting local PX4 src, I cloned repository in docker /home/user
. After doing some installation steps, make px4_sitl gazebo-classic
command shows following errors.
FAILED: src/lib/version/build_git_version.h
cd /home/user/PX4-Autopilot && /usr/bin/python3 /home/user/PX4-Autopilot/src/lib/version/px_update_git_header.py /home/user/PX4-Autopilot/build/px4_sitl_default/src/lib/version/build_git_version.h --validate
Traceback (most recent call last):
File "/home/user/PX4-Autopilot/src/lib/version/px_update_git_header.py", line 139, in <module>
mavlink_git_version = subprocess.check_output('git rev-parse --verify HEAD'.split(),
File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'rev-parse', '--verify', 'HEAD']' returned non-zero exit status 128.
I think I found the reason.
Previously, I installed PX4-Autopilot at /home/user
. Maybe px4_update_git_header.py
requires some certain directory.
After I removed the source code and re-installed at ~/
, I successfully build with make px4_sitl gazebo-classic
. It might not be correct reason but I didn't do any other stuff.
Heya,
I am trying to create a docker image that will let me build a ROS2+Gazebo+PX4 environment with DDS support.
Environment Docker image: px4io/px4-dev-ros2-galactic:latest PX4 commit: 1e93ae31482f6bdc64bc8120f5f2e5508dfef625 Gazebo installed via:
curl -sSL http://get.gazebosim.org | sh
MicroDDS agent installed via:https://github.com/micro-ROS/micro_ros_setup.git
Python version: 3.8.10To run the environment
Error:
build_git_version.h is not present:
I couldn't get rid of the error whatever I tried. I didn't figure out a way to generate
build_git_version.h
. Did anyone faced that with the recent commits?