Skip to content

'ascii' codec can't decode byte #4

@AtharvaBhorpe

Description

@AtharvaBhorpe

I'm using ROS-Melodic.
When running the serial_odom.py script in ROS, it's giving the following output:


vm: $rosrun serial_odom serial_odom.py _port:=/dev/ttyACM0
[INFO] [1615798346.197255]: Serial odometry starting
[INFO] [1615798346.204596]: Publishing odometry: odom
[INFO] [1615798346.207512]: Publishing transform from odom to base_link
[INFO] [1615798346.209393]: Starting on serial port: /dev/ttyACM0
[INFO] [1615798347.170208]: Reaching for serial
[INFO] [1615798347.171422]: Here are the first 5 data readings ...
Exception in thread Thread-8:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/vm/URDFs/src/Simple-ROS-Arduino-odometry/script/v0.3/serial_odom.py", line 95, in serial_handle
rospy.loginfo( init_msg.encode('ascii')[0:(len(init_msg)-1)] )
UnicodeDecodeError: 'ascii' codec can't decode byte 0xbf in position 3: ordinal not in range(128)

^CShutting down


What am I doing wrong here?
Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions