-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Quadrotor Autonomous Tracking & Landing (QATL) of Asctec Pelican Quadrotor on a Mobile Platform (Husqvarna Automower 330X) in a Motion Capture (Optitrack) System
-
Download the package asctec_mav_framework from https://github.com/divyashah/QATL/tree/master/asctec_mav_framework , copy it in the Catkin Workspace /src folder and catkin_make in the Mastermind of Asctec Pelican.
-
Flash the HLP with a custom firmware (main.hex) which is provided in this package (Inside the Catkin Workspace, go to /src/ asctec_mav_framework/asctec_hl_firmware/)
-
Flash the HLP following the instructions:
a.sudo apt-get install openocd
b. Now, you can connect your computer to the AscTec AutoPilot via the AscTec JTAG Adapter to transfer the binary on it. Check if the device is plugged in and recognized:
ls /dev/ttyUSB*
c. Now, connect to the device via OpenOCD with the command
sudo openocd -f lpc2xxx_asctecusbjtag05.cfg:
d. If there are some warnings or errors, please restart the system and try again.
e. Then you have to open a telnet connection to OpenOCD:
telnet localhost 4444
f. With reset halt, you can stop the device. With flash write_image erase main.bin, you can write the compiled binary onto the device and reset run starts the device again.
reset halt
flash write_image erase main.bin
reset run
-
Download the package mocap_optitrack from https://github.com/divyashah/QATL/tree/master/mocap_optitrack , copy it in the Catkin Workspace /src folder and catkin_make in the Mastermind of Asctec Pelican.
-
Download the package hrp from https://github.com/divyashah/QATL/tree/master/hrp copy it inside the Catkin Workspace /src folder and catkin_make on the target computer.
-
Download the package interface_mocap_hlp from https://github.com/divyashah/QATL/tree/master/interface_mocap_hlp , copy it in the Catkin Workspace /src folder and catkin_make in the Mastermind of Asctec Pelican.
1.Error during catkin_make of asctec_mav_framework:
Resolved using the link: https://github.com/ethz-asl/ethzasl_msf/issues/62
For Ubuntu 12.04 and onwards you’ll have to install from source: https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
Download and Unpack the files and run the following in the terminal:
./configure
make
sudo make install
2.Compiling firmware arm-elf-gcc error:
Resolved by installing arm-elf-gcc and reboot after installation
3. To autostart GUI of the Mastermind:
sudo gedit /etc/default/grub
change GRUB_CMDLINE_LINUX='text'
to GRUB_CMDLINE_LINUX=''
Comment GRUB_TERMINAL=console
save the file
sudo update-grub
4. roscore not running on ssh:
This is due to the reason that the ROS environment is not setup properly in mastermind. This is resolved by:
sudo update-locale LANG=C LANGUAGE=C LC_ALL=C LC_MESSAGES=POSIX
- Moving the Platform
• Connect the Auto mower with the target computer using USB.
• Make sure that the serialPort and i2cbus defined in the launch file (am_driver/launch/automower_hrp_tracking.launch)match those on your target computer.
•sudo chmod 666/dev/tdyACM0
• In the settings/tools by holding 7 and 9 keys together for some seconds of the automower and select special settings and select the override loop checking option
• Launch target withroslaunch am_driver automower_hrp_tracking.launch
• Press start and close the hatch of the auto mower.
• Launch keyboard control on host withrosrun am_control keyboard_teleop.py
• Alternatively publish the velocity command using the topic /cmd_vel - Asctec Mastermind is accessed using
ssh@IP_Address_of_Mastermind
by using the password as “asctec”. - Running Mocap Optitrack ROS node
• By default MOCAP optitrack can stream only one rigid body data. In order to stream data of two rigid bodies: In the file mocap_datapackets.cpp, in the function parse(), the program does not add the counter for buffer exactly and this causes the program to crash. To fix this error we need to addseek(2)
after theseek(sizeof(float))
like this:
//skip mean marker error
seek(sizeof(float));
seek(2);
(Detail instruction on how to run mocap optitrack can be found at https://github.com/EmaroLab/docs/wiki/Motion-Capture-Instructions-(Optitrack-Motive) )
• Open motive in the system connected with optitrack cameras and stream the data in the IP address of the Asctec Mastermind.where the Rigid body 1 is quad rotor and Rigid body 2 is moving platform.
• Use the launch file to launch the node in mastermind:
roslaunch mocap_optitrack mocap.launch
- Running flight control unit
• Modify the following parameters in the fcu_parameters.yaml file in the launch folder of Asctel_hl_interface package so that it looks like this:
fcu/serial_port: /dev/ttyS2
fcu/baudrate: 115200
fcu/frame_id: fcu
fcu/packet_rate_imu: 5.0
fcu/packet_rate_rc: 5.0
fcu/packet_rate_gps: 5.0
fcu/packet_rate_ssdk_debug: 5.0
fcu/packet_rate_ekf_state: 5.0
fcu/max_velocity_xy: 0.5
fcu/max_velocity_z: 0.5
fcu/state_estimation: HighLevel_SSDK
fcu/position_control: HighLevel
• Use the launch file to launch the node in mastermind:
roslaunch asctec_hl_interface fcu.launch
- Running interface_mocap_hlp node
rosrun interface_mocap_hlp interface_mocap_hlp_node
- Running the Way-Point Server
rosrun asctec_hl_interface waypoint_server
- Running the Tracking and Landing Module
•Rosrun asctec_hl_interface publisher_node
• In order to select the type of controller, set the respective values of gains in the publisher.cpp file inside asctec_mav_framework/asctec_hl_interface/src as follows:
- PD Controller
• set ki and kv to zero
• kp and kd are the position error and velocity error gains respectively to be tuned - PID Controller
• set kv to zero
• kp, ki and kd are the position error, sum of position error and velocity error gains respectively to be tuned - Static Feedback Controller
• set ki and kd to zero
• set kv to one
• kp is the position error gain to be tuned