Comments (5)
Can you supply which version or commit hash you were running of ArduPilot to reproduce this? "Rover" is not a version.
from ardupilot.
from ardupilot.
@arshPratap Do you have a chance to look at this bug?
from ardupilot.
Just an update. I moved to HW and the error is not present when using serial there.
from ardupilot.
Running the agent
ros2 run micro_ros_agent micro_ros_agent udp4 -p 2019 -r dds_xrce_profile.xml
Plane
./Tools/autotest/sim_vehicle.py -v Plane --map --console --enable-dds
If you call arming right away, before the vehicle is booted, it properly reports a failure.
ros2 service call /ap/arm_motors ardupilot_msgs/srv/ArmMotors "{arm: true}"
If you call it later once it's properly initialized, it reports a success.
For plane, you can set the mode to 4, and it switches mode correctly.
ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 4}"
I tested modes 1-9. All work. 9 gets rejected, with the current mode reported as 8, and the logs show "AP: No such mode 9"
Copter
./Tools/autotest/sim_vehicle.py -v Plane --map --console --enable-dds
Requesting all the mode changes works as expected.
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 0}"
waiting for service to become available...
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=0)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=0)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 1}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=1)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=1)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 2}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=2)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=2)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 3}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=3)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=3)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 4}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=4)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=4)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 5}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=5)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=5)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 6}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=6)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=6)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 7}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=7)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=7)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 8}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=8)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=False, curr_mode=7)
Rover logs
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/arm_motors ardupilot_msgs/srv/ArmMotors "{arm: true}"
requester: making request: ardupilot_msgs.srv.ArmMotors_Request(arm=True)
response:
ardupilot_msgs.srv.ArmMotors_Response(result=True)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 1}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=1)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=1)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 2}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=2)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=False, curr_mode=1)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 3}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=3)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=3)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 4}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=4)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=4)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 5}"
waiting for service to become available...
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=5)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=5)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 6}"
waiting for service to become available...
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=6)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=False, curr_mode=5)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 7}"
waiting for service to become available...
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=7)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=7)
ryan@B650-970:~/Dev/ardu_ws$ ros2 service call /ap/mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 8}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=8)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=False, curr_mode=7)
Conclusion
I can't reproduce on SITL. Please re-open if you can provide some steps like this to reproduce, otherwise I suspect it's an issue in your code.
from ardupilot.
Related Issues (20)
- Plane: SITL on hardware does not compile for some boards
- Unreliable mode switch via aux function HOT 4
- Relay switch for video transmitter voltage control not working in 4.5 (RADIX2HD) HOT 6
- ArduPilot F.Port implementation assumes RSSI scaling of 0-50 while Betaflight uses 0-100
- Feat: Request for controlling the PWM values of all motors for autonoumous tracking HOT 6
- Problem with micro ros. (won't publish the topic). HOT 5
- Upgrade to AP 4.5.x causes external I2C baro BMP280 not detected while onboard SPI BMP280 works.
- OBAL startup problem with enable dds parameter. (SIGSEGV, Segmentation fault.) HOT 2
- when WP_YAW_BEHAVIOR = 0, MAV_CMD_CONDITION_YAW with relative angle cause wrong heading
- ArduPilot should flash green lights when AHRS-is-happy, *not* GPS-is-happy HOT 6
- Sensor Position Offset Compensation accel HOT 4
- Plane: v 4.5.4 and 4.6-dev. Cameras does not switching HOT 3
- 8266 based ELRS or mavesp8266 fails due to DEFAULTGPIO driving their TX lines low in bootloader HOT 1
- Filter: Non-quiet NaNs are logged for FCN HOT 1
- Issue with H-RTK Mosaic-H (Dual Antenna Heading) in ArduPilot 4.6 Dev HOT 2
- Plane: Unexpected Large Target Bearing at WP1 HOT 3
- Porting to a stm32f411ccu6 flight controller board HOT 1
- Tradheli: After landing in Autotune and motor interlock disables, motor can restart HOT 1
- decompile the apj file HOT 1
- Iflight Blitz H743 Wing Relay 2 (GPIO 81) not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ardupilot.