Quantcast
Channel: ArduPilot Discourse - Latest topics
Viewing all 46382 articles
Browse latest View live

Issue with microxrceddsgen Command Not Found in ROS2 + ArduPilot Setup

$
0
0

Hi everyone,

I’m currently working on integrating ROS2 with ArduPilot and have been following the official documentation. However, I’m encountering an issue when I try to run the following command:

microxrceddsgen -help

It returns the error message: “microxrceddsgen: command not found.” After spending several hours troubleshooting, I haven’t been able to figure out the cause. I’ve also tried installing it using the command:

sudo snap install micro-xrce-dds-agent

but the problem persists. As a result, I’m stuck and unable to proceed with the project.

Has anyone experienced this issue or knows how to resolve it? Any help would be greatly appreciated!

Thank you in advance!

1 post - 1 participant

Read full topic


Volz Serial Coms

$
0
0

I am very new to this type of work, but I am confident I can figure this out with some guidance.

How do I control a Volz actuator via a serial bus on the cube orange? I see where the swashplate can be setup with a “Volz” option in Mission Planner. However, I dont see an output on the serial channel I selected when I provide inputs. What am I doing wrong? Is there a better way to handle serial coms than this?

1 post - 1 participant

Read full topic

New board JHEMCU GF30F405 - strange behavior

$
0
0

Hey. I have a question about adding a new FCU board. I have JHEMCU_GF30F405 which is very similar to already ported JHEM_JHEF405. I managed to upload and run firmware on GF30F405 board but I have a strange problem - if I edit existing and working JHEM_JHEF405 hwdef file, setting proper details of GF30F405 board and setting a new board id It works and I can build and run a firmware. If I copy those files as a new directory inside AP_HAL_ChibiOS/hwdef - exactly the same files I just uploaded, but as a new directory - it fails to run after powering on. So - if I use existing directory and adjust hwdef, including new APJ_BOARD_ID - it works, if create a new directory - it does not run - it uploads, but doesn’t run. Any ideas?

1 post - 1 participant

Read full topic

F405 Quicktune, without SD Card

$
0
0

I must ask, its possible to run the Quicktune on a Quadcopter SpeedbeeF4Mini, exist the Script, but i cant run this on F4
have any an Idea, probably the C++ Quicktune

1 post - 1 participant

Read full topic

AHRS.Source lua script errors

$
0
0

I’m trying to run the AHRS Source GPS Optflow.lua and I get the following error:

ahrs-source-gps-optiflow.lua:124: attempt to call a nil value (method 'distance_orient')

I’ve also tried ardupilot/libraries/AP_Scripting/applets/ahrs-source-extnav-optflow.lua at master · ArduPilot/ardupilot · GitHub and same error in what appears to be the same code.

(Yes, I did have the wind calibration script running, but I’ve removed that in case somehow that was causing the issue. It wasn’t)

The only edit I made to either script was to change from switch 1 (300) to switch 2 (301).

-- get rangefinder distance
  local rngfnd_distance_m = 0
  if rangefinder:has_data_orient(rangefinder_rotation) then
    rngfnd_distance_m = rangefinder:distance_orient(rangefinder_rotation)  -- this is line 124
  end
  local rngfnd_over_threshold = (rngfnd_distance_m == 0) or (rngfnd_distance_m > rangefinder_thresh_dist)

Matek H743-Bdshot AC4.5.3 Micoair MTF-01 Optical flow (all calibrated and working)

Any ideas?

Edit: Just add the ranger finder was working and I was getting accurate data from it.

1 post - 1 participant

Read full topic

Executing Mission Planner Actions from Radio

$
0
0

Hi there,

Mission Planner’s Actions tab has several actions, such as PREFLIGHT_CALIBRATION and PREFLIGHT_REBOOT_SHUTDOWN. If I am only using a simple radio like the TBS Tango2, is there any way to execute that type of Action? Is it possible to invoke it through Lua script?

Thank you

1 post - 1 participant

Read full topic

Indoor flights, AHRS_GPS_USE

$
0
0

Hi there,

I have a vehicle equipped with GPS for ability to fly outdoors when GPS is available, but it also flies indoors in GPS-denied environments. I am reading the Indoor Flying Guidelines, which states

Disable GPS in non-auto** modes - set AHRS_GPS_USE to 0

https://ardupilot.org/copter/docs/indoor-flying.html

However, when I go to AHRS_GPS_USE in Mission Planner, the popup help window says

A value of zero should never be used for normal flight.

I am hoping to get some guidance here because it seems to be conflicting information, dependent on how one defines “normal flight”.

As it is, my RC9 is set to 90 (EKF Source Set) to switch between using GPS and Optical Flow/LIDAR depending on whether I am flying outdoors or in GPS-denied environments. So, should I write a script that monitors RC9 PWM and set AHRS_GPS_USE = 0 using Optical Flow and set AHRS_GPS_USE = 1 when using GPS? Or should I just leave it to 1 or should I leave it to 0?

Thank you

1 post - 1 participant

Read full topic

Design of Multirotors

$
0
0

This is a post where everyone can share their insights, experiences, best practices and findings in drone/multirotor design and development, whether is about optimizing frame structures

I’ve ben designing multirotor of different categories for around 2 years, over this I’ve been developing generic frame such as quads,hexa and making them as light as possible using various composites and additive manufacturing techniques. Lately ive had some questions going on in my mind “what if we do this was,will it work or not”. Here are those questions

  1. Is it always necessary to have my rotors on the wheelbase of the multirotor, if not what are the considerations to be taken while design.
  2. what are the best practices while designing a multirotor frame that u follow
  3. consider a quad,will it be ok if my forward motors are inverted and rear motors are normal/vice versa,is it must to have propellers in same plane,if not what are the considerations to be observed while designing
    4.what are the considerations while designing composite monocoque multirotor frames.

i will also update you guys on the best practices that i generally flow once this conservation is active

thank you

1 post - 1 participant

Read full topic


APM core code disregards GPS position, even though GPS reports RTK-Fixed

$
0
0

https://drive.google.com/file/d/1Qr-EsF0pznWxyK7LzpKu3VjxTEQzHAjA/view?usp=sharing

Greetings all

We are trying to upgrade our configuration to a firmware version beyond 4.3.8. Our crafts are GPS-for-Yaw style, with a stack of Ublox boards where the moving-baseline rover feeds the Autopilot with the position and rtk vector, and the moving-baseline base is physically attached to UART2 of the rover, feeding the rover RTCM messages. Due to our design, we cannot rely on the Cube’s internal compass. Due to the GSF not being available yet in this version, we set COMPASS_ENABLE=1 and COMPASS_USE=0. We get a yaw solution and are off to the races.

Every time we have tested 4.4.0 and above, some part of the ArduPilot core code is unhappy with the gps solution, but there is no obvious culprit. In the above log, you’ll see that the message delta is mostly 200ms, the solution is RTK-Fixed, and the GPS antenna locations are reasonably accurate. In this craft, they are on opposite sides of the cube laterally, 53cm apart. The EKF reports that it has no horizontal position so hence we fail prearm checks that require a position, as well as being unable to go into modes requiring this. EKF innovations for POSD are below 1. I think the GSF is configured correctly, but I don’t know for certain, regardless, the heading doesn’t seem to reflect the compass even if it were turned on.

In the above log, I attempt to use GPS autoconfig and mess up the GPS type, it is supposed to be ublox movingbase-rover. I will fix this tomorrow, but before the majority of the log this was set to type=ublox This configuration works for us in versions 4.3.8 but not after, and I don’t know why.

I am at a loss

1 post - 1 participant

Read full topic

Crash after ekf_yaw_reset

$
0
0

hello guys, i designed a drone for my uni project.
the components i used are

  1. Speedy bee f405 stack v3
  2. F80 pro t motors
  3. 1200 mAh 6 S lipo
    The drone gained altitude whenever i used to fly in altitude hold mode initially. Then i adjusted the paramaters. the para meters i adjusted were Mot_Thst_ hover. As my copter has high power to thrust ratio i had lower the parameter. I flew the copter again and again it gained altitude but this time it drifted so much, i lost control. I applied land mode so it could land but it didnt follow any command it crashed very far away from. i recover the drone fortunately and saw the logs. this time i saw ekf_yaw_reset error.
    i am sharing the log file. you will see i did two flights. kindly help me. i will appreciate the effort. Thankyou

https://drive.google.com/drive/folders/1Y84lWZ7j1qzzQtpAQ90vXvzsCwsnQCJU?usp=sharing

7 posts - 3 participants

Read full topic

Rngfnd_orient=24(facing to)upward

$
0
0

We can check rngfnd=0 at data → sonarrange.
And rngfnd=0 to 7 ctrl-f → proximitry.
But I can not check rngfnd=24
How to check it?

1 post - 1 participant

Read full topic

Payload voltage monitoring

$
0
0

Hi,
I want to monitor the voltage of the payload attached to my drone!
I’m using Pixhawk 6c mini.
How can I interface the output voltage of my payload (an external battery used to power a pump in my case), independent of the primary battery?
Can we use some external voltage sensor over i2c or repurpose the UART on GPS2?

2 posts - 2 participants

Read full topic

Emlid M2 Integration Into Ardupilot Not working

$
0
0

I’ve been trying to integrate the Emlid Reach M2 into Ardupilot for RTK, but I’m having some issues. I am using an NTRIP connection to send updates to the RTK module, but when I try to inject GPS, the Emlid goes silent and stops receiving corrections and disconnects from the internet while MP says connection attempt failed. When I unplug it from the pixhawk and cycle the power, it will start working fine again.

I followed this page exactly for the parameters: ArduPilot Integration | RTK Modules

But, I’m not 100% confident that I have all the parameters right since I’m using NTRIP.

For Correction Input: Using NTRIP with all of my NTRIP provider settings
Base Output: TCP Server, localhost:9000

2 posts - 1 participant

Read full topic

Simulated GPS over ArduPilot SITL TCP

$
0
0

Hi there - I’m trying to run ArduCopter SITL, with sim_vehicle.py, and with a custom GPS signal.

When I run this ‘normally’ (./sim_vehicle.py -v ArduCopter -L Ballarat -f gazebo-iris --model JSON --map --console --no-mavproxy --udp -C --mav20 -aircraft=iris) all works, and I can connect the simulated UAV to QGroundControl successfully over UDP, fly, etc.

However, what I really want to be able to do is to send GPS NMEA data over TCP (e.g. with software like gpsfeed+), for the UAV to then receive this, to process it, and to use this instead.

Currently, I only have partial success: I run the command
./sim_vehicle.py -v ArduCopter -f gazebo-iris -A "--serial3=tcpclient:172.20.80.1:2222" --model JSON --map --console --no-mavproxy --udp -C --mav20 -aircraft=iris
to make the UAV listen for serial GPS data on that TCP connection. Then, I try to connect the UAV to QGroundControl, and it then does not do so until I start up a gpsfeed+ session which sends NMEA data over that TCP connection (I’ve verified this works just with wget). When the NMEA data starts sending, the UAV suddenly connects to QGroundControl successfully, but it does not register any GPS input, it doesn’t show the UAV on the map at all, and as soon as the NMEA data stops being sent over TCP, the UAV immediately disconnects from QGroundControl again.

I’ve added the below to APM_Config.h as well, to try and get the UAV to read NMEA data properly, but also no luck.

#define GPS_PROTOCOL GPS_PROTOCOL_NMEA
#define GPS_TYPE 5
#define SERIAL3_PROTOCOL 5
#define AP_SIM_ENABLED 1
#define AP_GPS_ENABLED 1

I have two questions really:

  1. How can I get the UAV to read the NMEA data properly from the TCP connection
  2. Why is the connection of the UAV to QGC dependent on NMEA data being sent on the TCP port?

1 post - 1 participant

Read full topic

Connecting servo on M5?

$
0
0

My Kakute H7 controller has connections for eight motors. M1 through M4 are for my quad’s motors and I want to run a micro servo on M5. In setup>radio calibration, radio 9 is a rotary switch that moves the green bar from 999 to 2000. In Config>user Params RC9_OPTION is set to Mount1 Pitch. In setup> servo output position 5 is set to Mount1 Pitch. The servo’s signal wire is connected to M5 and the other wires to 5 volts and ground. I have checked the servo with a servo tester. It doesn’t move when I arm and then rotate the switch. What have I missed? Thanks.

1 post - 1 participant

Read full topic


SITL with AC_CustomControl does not work

$
0
0

Made a custom attitude controller in AC_CustomControl. When I build and upload this to my board, all of the custom control parameters appear in my GCS, as expected.

When I try to build and run SITL, none of my custom control parameters appear in MAVProxy. The documentation for AC_CustomControl states that the SITL has custom controllers enabled by default, which seems to be completely false. Flagging “–enable-custom-controller” on the SITL build does nothing either.

I’ve tried this using both the sim_vehicle.py script, and doing “Simulation on Hardware”, and got the same result.

Is there any way to force SITL to have CustomControl enabled? I literally just want to make sure all the signs, inputs, and outputs are correct on my custom attitude controller before trying it on hardware.

1 post - 1 participant

Read full topic

Mavros takeoff issue with SITL ArduPlane

$
0
0

Hello there,

I am trying to get my airplane to takeoff autonomously with the following service call :
ros2 service call /mavros/cmd/takeoff mavros_msgs/srv/CommandTOL "{min_pitch: 0.0, yaw: 0.0, latitude: 0.0, longitude: 0.0, altitude: 10.0}" (or via rqt)
Which return :

waiting for service to become available...
requester: making request: mavros_msgs.srv.SetMode_Request(base_mode=0, custom_mode='TAKEOFF')
response:
mavros_msgs.srv.SetMode_Response(mode_sent=False)

It works well with a copter but I can’t get it to work with a plane.
In MP, I need to use the mode “TAKEOFF” to make my plane takeoff and I am not using :


that only work with a copter.

I tried to set the mode to takeoff by calling the mavros dedicated service but I hasn’t work, expected has it is not existing in the command.

# set FCU mode
#
# Known custom modes listed here:
# http://wiki.ros.org/mavros/CustomModes

# basic modes from MAV_MODE
uint8 MAV_MODE_PREFLIGHT		= 0
uint8 MAV_MODE_STABILIZE_DISARMED	= 80
uint8 MAV_MODE_STABILIZE_ARMED		= 208
uint8 MAV_MODE_MANUAL_DISARMED		= 64
uint8 MAV_MODE_MANUAL_ARMED		= 192
uint8 MAV_MODE_GUIDED_DISARMED		= 88
uint8 MAV_MODE_GUIDED_ARMED		= 216
uint8 MAV_MODE_AUTO_DISARMED		= 92
uint8 MAV_MODE_AUTO_ARMED		= 220
uint8 MAV_MODE_TEST_DISARMED		= 66
uint8 MAV_MODE_TEST_ARMED		= 194

uint8 base_mode		# filled by MAV_MODE enum value or 0 if custom_mode != ''
string custom_mode	# string mode representation or integer
---
bool mode_sent		# Mode known/parsed correctly and SET_MODE are sent

So, do you know how to correct that ?

Thank you =) !
Step

1 post - 1 participant

Read full topic

MATLAB Error reading bin file

$
0
0

Howdy, I am new to ardupiot and its files and am currently working on trying to parse some flight test data. I used Mission Planner’s bin->Matlab function in hopes to use matlab for data analysis.

When I tried to use the “ardupilotreader” function in MATLAB I got an error that says, “Unable to parse the log file because the file does not contain FMT message.”

I don’t understand why this happened. The original log file has the FMT messages, and every other piece of data got copied into the .mat file except for the FMT messages. Any ideas on how to fix this problem?

2 posts - 2 participants

Read full topic

EKF3 AHRS Gimbal Lock avoidance question

$
0
0

I was hoping to ask an AHRS question about EKF3, specifically in regards to the common Singularity found at ±90 degrees pitch up

Does EKF3 simultaneously calculate 2 separate euler angle reference frames from a common Quaternion output, one for Vertical, one for Horizontal? Or does it switch between them when a Vehicle (like a Tailsitter) is transitioning between Vert/Horiz?

1 post - 1 participant

Read full topic

Quiktune Problem - Does not execute?

$
0
0

Hi guys

Really need your help. I am having problems running quiktune on one of my larger quads. I have run it in the past on a smaller frame and worked fine. Basic issue is that the script loads and activates but does not execute the PID runs in flight. I am running CubePilot Orange+, Here4 GPS. Notch filter has been setup and running as best I can. Please review my logs and let me know your thoughts.

thanks

Mark.

QuadParam.zip (410.6 KB)

3 posts - 1 participant

Read full topic

Viewing all 46382 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>