Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to connect with Arducopter in SITL #8

Open
ghost opened this issue Sep 29, 2017 · 0 comments
Open

Not able to connect with Arducopter in SITL #8

ghost opened this issue Sep 29, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 29, 2017

Hello,

I am trying to connect to SITL with following details:

comm = MAVUdpCommNIO3.getInstance(model, "127.0.0.1",5760, 14550);
proxy = new MAVUdpProxyNIO3("127.0.0.1",5501,"0.0.0.0",14556,comm);
peerAddress = "127.0.0.1";
System.out.println("Proxy Controller loaded (SITL) ");

It got connected with SITL - ardupilot/Arduplane by running sim_vehicle.py.

Trying to give command in following manner:
msg_msp_status msg = new msg_msp_status(2,1);
msg.load = (int)(osBean.getSystemLoadAverage()*100);
msg.autopilot_mode = control.getCurrentModel().sys.autopilot;
msg.memory = (int)(mxBean.getHeapMemoryUsage().getUsed() * 100 /mxBean.getHeapMemoryUsage().getMax());
msg.com_error = control.getErrorCount();
msg.uptime_ms = System.currentTimeMillis() - tms;
msg.status = control.getCurrentModel().sys.getStatus();
msg.setVersion(config.getVersion());
msg.setArch(osBean.getArch());
msg.unix_time_us = control.getCurrentModel().sys.getSynchronizedPX4Time_us();
control.sendMAVLinkMessage(msg);
;

It gets connected with ArduPlane and mode changes from CIRCLE - RTL
Output in SITL:
APM: Ground start complete
online system 1
MANUAL> Mode MANUAL
APM: ArduPlane V3.8.2-dev (a629bb7f)
APM: Throttle failsafe on 767
APM: Failsafe. Short event on,
APM: Flight mode = 1
Flight battery 100 percent
Received 902 parameters
Saved 902 parameters to mav.parm
CIRCLE> APM: Airspeed sensor calibrated
Mode CIRCLE
APM: GPS 1: detected as u-blox at 115200 baud
APM: EKF2 IMU0 initial yaw alignment complete
APM: EKF2 IMU1 initial yaw alignment complete
APM: Init HOME
APM: Failsafe. Long event on,
APM: Flight mode = 11
RTL> Mode RTL
APM: EKF2 IMU0 tilt alignment complete
APM: EKF2 IMU1 tilt alignment complete
APM: EKF2 IMU0 Origin set to GPS
APM: EKF2 IMU1 Origin set to GPS
APM: EKF2 IMU0 is using GPS

I am not sure whether it is working correctly. Kindly confirm

Also trying same steps with ArduCopter (running sim_vehicle.py in ArduCopter) -- There is no change in mode or vehicle state.

Please suggest steps to connect MAVComm in SITL with ArduCopter. Kindly let me know if any configurational changes are required while using MAVComm with SITL.

Thanks in Advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants