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

mavwp dump is broken - TypeError: a bytes-like object is required, not 'str' #1784

Closed
julled opened this issue Sep 9, 2022 · 1 comment
Closed
Labels
Milestone

Comments

@julled
Copy link

julled commented Sep 9, 2022

Issue details

mavwp dump is broken in mavros 1.13.0 . Does it maybe still expect python2?

MAVROS version and platform

Mavros: 1.13.0
ROS: Noetic
Ubuntu: raspberry pi os

Autopilot type and version

[x ] ArduPilot ... SITL simulator
[ ] PX4

Version: master

Node logs

searchwing@test:~ $ rosrun mavros mavwp dump wp.txt
[ERROR] [1662742151.544002]: bad callback: <function do_dump.<locals>._write_file at 0xb4650340>
Traceback (most recent call last):
  File "/install/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/install/lib/mavros/mavwp", line 147, in _write_file
    wps_file.write(args.file, topic.waypoints)
  File "/install/lib/python3/dist-packages/mavros/mission.py", line 105, in write
    writer.writerow((self.file_header ,))
TypeError: a bytes-like object is required, not 'str'

Diagnostics

header: 
  seq: 1828
  stamp: 
    secs: 1662742445
    nsecs: 629264557
  frame_id: ''
status: 
  - 
    level: 0
    name: "mavros: FCU connection"
    message: "connected"
    hardware_id: "serial:///dev/ttyS0:500000"
    values: 
      - 
        key: "Received packets:"
        value: "10808"
      - 
        key: "Dropped packets:"
        value: "0"
      - 
        key: "Buffer overruns:"
        value: "0"
      - 
        key: "Parse errors:"
        value: "0"
      - 
        key: "Rx sequence number:"
        value: "6"
      - 
        key: "Tx sequence number:"
        value: "0"
      - 
        key: "Rx total bytes:"
        value: "4713176"
      - 
        key: "Tx total bytes:"
        value: "31061"
      - 
        key: "Rx speed:"
        value: "3737.000000"
      - 
        key: "Tx speed:"
        value: "21.000000"
  - 
    level: 0
    name: "mavros: GPS"
    message: "3D fix"
    hardware_id: "serial:///dev/ttyS0:500000"
    values: 
      - 
        key: "Satellites visible"
        value: "10"
      - 
        key: "Fix type"
        value: "6"
      - 
        key: "EPH (m)"
        value: "1.21"
      - 
        key: "EPV (m)"
        value: "2.00"
  - 
    level: 0
    name: "mavros: Heartbeat"
    message: "Normal"
    hardware_id: "serial:///dev/ttyS0:500000"
    values: 
      - 
        key: "Heartbeats since startup"
        value: "1246"
      - 
        key: "Frequency (Hz)"
        value: "0.999976"
      - 
        key: "Vehicle type"
        value: "Fixed wing aircraft"
      - 
        key: "Autopilot type"
        value: "ArduPilot"
      - 
        key: "Mode"
        value: "MANUAL"
      - 
        key: "System status"
        value: "Standby"
  - 
    level: 0
    name: "mavros: System"
    message: "Normal"
    hardware_id: "serial:///dev/ttyS0:500000"
    values: 
      - 
        key: "Sensor present"
        value: "0x1361FC3F"
      - 
        key: "Sensor enabled"
        value: "0x1361803F"
      - 
        key: "Sensor health"
        value: "0x1371803F"
      - 
        key: "3D gyro"
        value: "Ok"
      - 
        key: "3D accelerometer"
        value: "Ok"
      - 
        key: "3D magnetometer"
        value: "Ok"
      - 
        key: "absolute pressure"
        value: "Ok"
      - 
        key: "differential pressure"
        value: "Ok"
      - 
        key: "GPS"
        value: "Ok"
      - 
        key: "motor outputs / control"
        value: "Ok"
      - 
        key: "rc receiver"
        value: "Ok"
      - 
        key: "AHRS subsystem health"
        value: "Ok"
      - 
        key: "Terrain subsystem health"
        value: "Ok"
      - 
        key: "Logging"
        value: "Ok"
      - 
        key: "Battery"
        value: "Ok"
      - 
        key: "pre-arm check status. Always healthy when armed"
        value: "Ok"
      - 
        key: "CPU Load (%)"
        value: "0.0"
      - 
        key: "Drop rate (%)"
        value: "0.0"
      - 
        key: "Errors comm"
        value: "0"
      - 
        key: "Errors count #1"
        value: "0"
      - 
        key: "Errors count #2"
        value: "0"
      - 
        key: "Errors count #3"
        value: "0"
      - 
        key: "Errors count #4"
        value: "0"
  - 
    level: 0
    name: "mavros: Battery"
    message: "Normal"
    hardware_id: "serial:///dev/ttyS0:500000"
    values: 
      - 
        key: "Voltage"
        value: "12.59"
      - 
        key: "Current"
        value: "0.0"
      - 
        key: "Remaining"
        value: "100.0"
---

Check ID

searchwing@test:~ $ rosrun mavros checkid


OK. I got messages from 1:1.

---
Received 1686 messages, from 2 addresses
sys:comp   list of messages
  1:1     0, 1, 129, 2, 136, 137, 11020, 147, 22, 152, 24, 27, 29, 30, 32, 33, 163, 36, 164, 165, 168, 42, 178, 65, 193, 74, 111, 241, 116, 125
 255:230   66
@vooon vooon added the bug label Sep 11, 2022
@vooon vooon added this to the Version 1.14 milestone Sep 24, 2022
@vooon
Copy link
Member

vooon commented Sep 24, 2022

Should be fixed in 1.14. Please reopen if i'm wrong.

@vooon vooon closed this as completed Sep 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants