Skip to content

Any solution for ros_essentials_cpp - noetic for running talker.py and listener.py? #7

@saravanan1480

Description

@saravanan1480

When I do
rosrun ros_essentials_cpp talker.py

and

rosrun ros_essentials_cpp listener.py

I get the following error in talker.py Console....

rospy.exceptions.ROSSerializationException: <class 'struct.error'>: 'argument for 's' must be a bytes object' when writing 'b'hello world 19''
I tried converting /opt/ros/noetic/lib/python3/dist-packages/std_msgs/msg/_String.py
In function def serialize(self,buff) I have added
_x=bytes(_x,'utf-8')

Then everything goes fine.

But Is there any solution to it in ros_essentials_cpp code itself so that no modification could be done to _String.py?

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