Closed weiqil closed 6 years ago
@weiqil Thanks for the interest,
I guess the repo is currently badly documented. I will include a brief tutorial on how to setup the environment. The current simulation is based on the PX4 SITL
It seems like your SITL is not running properly, as in this document
You need to check if the following command is working properly.
cd <Firmware>
make posix_sitl_default gazebo
Once this is working, you can run the ROS node in this repo
@Jaeyoung-Lim Really nice of you to reply me so fast. I check the command: $ make posix_sitl_default gazebo it works well because I can fly the drone by typing the command $commander takeoff .
but the error still exists when running the launch file in this repo. The output shown in the terminal:
px4
starting.
INFO [Unknown] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
process[gazebo-5]: started with pid [26252]
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
process[gazebo_gui-6]: started with pid [26261]
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
process[vehicle_spawn_Asus_25663_5254384993934981838-7]: started with pid [26271]
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
process[rviz-8]: started with pid [26280]
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
ERROR [px4_daemon] pipe open fail (13)
ERROR [px4_daemon] Could not send commands
Error: no autostart file found (etc/init.d-posix/ERROR [px4_daemon] pipe open fail (13)
ERROR [px4daemon] Could not send commands)
etc/init.d-posix/rcS: 167: exit: Illegal number: -1
ERROR [Unknown] Startup script returned with return value: 512
pxh> Traceback (most recent call last):
File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 32, in
Sorry for troubling you again. I searched for the cause online but failed to figure out. Best Regards!
@weiqil There seems to be something wrong with your firmware installation.
Try
cd <Firmware_clone>
make posix_sitl_default gazebo
source ~/catkin_ws/devel/setup.bash // (optional)
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/posix_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/sitl_gazebo
roslaunch px4 posix_sitl.launch
@weiqil Could you confirm that the comment solved your problem?
@Jaeyoung-Lim
Hi,
Sorry I'm late reply. Indeed, I can not run the code by the launch file all the time.
$ roslaunch geometric_controller trajectory_track_circle.launch
parts of the output are:
process[sitl-5]: started with pid [5422] INFO [Unknown] PX4 daemon already running for instance 0 (Resource temporarily unavailable) process[gazebo-6]: started with pid [5423] process[gazebo_gui-7]: started with pid [5428] process[vehicle_spawn_Asus_4746_4639041922856050695-8]: started with pid [5433] process[rviz-9]: started with pid [5434] ================================================================================REQUIRED process [sitl-5] has died! process has died [pid 5422, exit code 255, cmd /home/weiqi_liu/src/Firmware/build/posix_sitl_default/bin/px4 /home/weiqi_liu/src/Firmware/ROMFS/px4fmu_common -s etc/init.d-posix/rcS name:=sitl log:=/home/weiqi_liu/.ros/log/20f914f6-eecf-11e8-9d80-1c872c47930c/sitl-5.log]. log file: /home/weiqi_liu/.ros/log/20f914f6-eecf-11e8-9d80-1c872c47930c/sitl-5*.log Initiating shutdown!
But if I run the code step by step, I get the desired result that the vehicle takes off and then follows a circular trajectory. The main steps are:
run the gazebo SITL
make posix_sitl_default gazebo
run the mavros
roslaunch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557"
run the controller
rosrun geometric_controller geometric_controller
rosrun trajectory_publisher trajectory_publisher
Sorry for my late reply and thanks for your sharing and help again.
weiqi liu
when running make posix_sitl_default gazebo
Makefile:493: *** "Make target posix_sitl_default not found. It either does not exist or posix_sitl_default cannot be the first argument. Use 'make help|list_config_targets' to get a list of all possible [configuration] targets.". Stop
Hi, Thank you for your sharing of this work. It does help me to understand the papers much. But when I try to run this code on my computer, there comes some errors. I type this command: roslaunch geometric_controller trajectory_track_circle.launch Part of the output is: UAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta [ INFO] [1540910990.048991065]: MAVROS started. MY ID 1.240, TARGET ID 1.1 0x2002e10 void QWindowPrivate::setTopLevelScreen(QScreen, bool) ( QScreen(0x192de90) ): Attempt to set a screen on a child window. 0x1fff110 void QWindowPrivate::setTopLevelScreen(QScreen, bool) ( QScreen(0x192de90) ): Attempt to set a screen on a child window. 0x2029880 void QWindowPrivate::setTopLevelScreen(QScreen, bool) ( QScreen(0x192de90) ): Attempt to set a screen on a child window. 0x2028be0 void QWindowPrivate::setTopLevelScreen(QScreen, bool) ( QScreen(0x192de90) ): Attempt to set a screen on a child window. [ERROR] [1540910994.865435761]: MODE: Unsupported FCU [ERROR] [1540910999.875788522]: MODE: Unsupported FCU [ERROR] [1540911004.886073662]: MODE: Unsupported FCU
Is there any thing wrong for my operation? Thanks a lot!