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

AttributeError in waypoint module when running sim_vehicle.py with Gazebo #55

Open
Haris-Alsaman opened this issue Apr 25, 2024 · 1 comment

Comments

@Haris-Alsaman
Copy link

Bug Report: AttributeError in waypoint module when using sim_vehicle.py with Gazebo

Describe the bug
When attempting to run sim_vehicle.py with the Gazebo model for APMrover2, the process fails, and MAVProxy exits unexpectedly. The error log indicates an AttributeError in the waypoint module.

To Reproduce
Steps to reproduce the behavior:

  1. Run the following command:
    sim_vehicle.py -v APMrover2 -f gazebo-rover -m --mav10 --map --console -I1

Error Log
Build commands will be stored in build/sitl/compile_commands.json
'build' finished successfully (3.372s)
SIM_VEHICLE: Using defaults from (ardupilot/Tools/autotest/default_params/gazebo-zephyr.parm)
SIM_VEHICLE: Run ArduPlane
SIM_VEHICLE: "/home/haris/ardupilot/Tools/autotest/run_in_terminal_window.sh" "ArduPlane" "/home/haris/ardupilot/build/sitl/bin/arduplane" "-S" "--model" "gazebo-zephyr" "--speedup" "1" "--slave" "0" "--defaults" "ardupilot/Tools/autotest/default_params/gazebo-zephyr.parm" "--sim-address=127.0.0.1" "-I0"
SIM_VEHICLE: Run MavProxy
SIM_VEHICLE: "mavproxy.py" "--out" "127.0.0.1:14550" "--master" "tcp:127.0.0.1:5760" "--sitl" "127.0.0.1:5501" "--mav10" "--map" "--console"
RiTW: Starting ArduPlane : /home/haris/ardupilot/build/sitl/bin/arduplane -S --model gazebo-zephyr --speedup 1 --slave 0 --defaults ardupilot/Tools/autotest/default_params/gazebo-zephyr.parm --sim-address=127.0.0.1 -I0
Connect tcp:127.0.0.1:5760 source_system=255
waypoint module not available; use old compat modules
Traceback (most recent call last):
File "/home/haris/.local/bin/mavproxy.py", line 1466, in
mpstate.load_module(m, quiet=True)
File "/home/haris/.local/bin/mavproxy.py", line 374, in load_module
module = m.init(mpstate, **kwargs)
File "/home/haris/.local/lib/python3.10/site-packages/MAVProxy/modules/mavproxy_wp.py", line 576, in init
return WPModule(mpstate)
File "/home/haris/.local/lib/python3.10/site-packages/MAVProxy/modules/mavproxy_wp.py", line 19, in init
super(WPModule, self).init(mpstate, "wp", "waypoint handling", public=True)
File "/home/haris/.local/lib/python3.10/site-packages/MAVProxy/modules/lib/mission_item_protocol.py", line 35, in init
self.completions())
File "/home/haris/.local/lib/python3.10/site-packages/MAVProxy/modules/lib/mission_item_protocol.py", line 106, in completions
cs = self.commands()
File "/home/haris/.local/lib/python3.10/site-packages/MAVProxy/modules/mavproxy_wp.py", line 161, in commands
ret.update({
AttributeError: 'NoneType' object has no attribute 'update'
SIM_VEHICLE: MAVProxy exited
SIM_VEHICLE: Killing tasks

System Details:

  • OS: Ubuntu 20.04
  • Python Version: 3.10
  • MAVProxy Version: 1.8.70
@SwiftGust
Copy link
Owner

SwiftGust commented Apr 30, 2024

Could you be able to run ArduPilot's own SITL for Rover without Gazebo?
Plus, it seems "APMRover2" is not the argument for run SITL in Ardupilot version you have, error states that its running ArduPlane SITL. It seems changed "ardurover" in the latest version.

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

2 participants