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)
- Copter/SITL: Guided mode can produce, "Should not be called on invalid location"
- Blitz H7 Pro Logging HOT 1
- COPTER / KAKUTE F7 buzzer startup scream on kakute F7 HOT 4
- AP_DDS: Improve instructions to launch plane SITL with colcon
- Possible bug with `force` argument in `AP_ParamT::set_and_save` function HOT 3
- Overspeed during mission with takeoff item
- VectorNav Driver Improvements HOT 2
- ChibiOS: bi-directional dshot capable in iomcu-f103-dshot and iomcu-f103-8Mhz-dshot HOT 1
- Ubuntu 24.04 environment issue HOT 2
- LED_CONTROL: Unable to specify the LED display pattern.
- iomcu reset with bdshot on 6X HOT 1
- Copter build does not complete Copter-4.5.3
- EK3 Source Switching wrong frame for GUIDED commands SOLVED HOT 4
- size of defaults.parm at build time make parameters resets to default at reboot HOT 2
- Custom firmware for RealFlight and Mission planner doesn't work as per instructions
- Plane: ARSPD_USE to 2 causes problems in RTL
- LUA: The error message of the script is unclear HOT 1
- Rover: Add RTL_ENABLE parameter HOT 7
- Support for HEQ g-port mini gimbal
- SERVO-BLH-3DMASK and SERVO-BLH-RVMASK encountered conflicts HOT 3
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.