ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rosrun rosserial_python serial_node.py

asked 2022-04-12 01:40:51 -0500

ahmet gravatar image

I m use ros melodic , i try communication between my computer and Arduino , i get this error ;

*rosrun rosserial_python serial_node.py /dev/ttyUSB0*

[INFO] [1649419916.072500]: ROS Serial Python Node

[INFO] [1649419916.117295]: Connecting to /dev/ttyUSB0 at 57600 baud

[WARN] [1649419916.123987]: Unexpected Error: <type 'exceptions.nameerror'="">

Traceback (most recent call last): File "/home/petka/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 107, in <module> client.port.close()

NameError: name 'client' is not defined

edit retag flag offensive close merge delete

Comments

Where did you get the rosserial ros package from? When you build from source, you are responsible for installing the needed python pkgs.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-04-12 15:19:32 -0500 )edit

I get from http://wiki.ros.org/rosserial_arduino... , I didn't do any installation, I have no idea how to install python package.Can you help about this issue?

ahmet gravatar image ahmet  ( 2022-04-13 00:45:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-13 07:14:50 -0500

Mike Scheutzow gravatar image

If you are new to ros, you should :

  1. delete the source code directory rosserial from catkin_ws/src/

  2. clean up broken catkin_make by deleting the catkin_ws/build and catkin_ws/devel directories.

  3. follow the 2.1.1 setup instructions to install from the apt repository. apt will install the extra dependencies for you. In the example apt-get command lines, you need to replace indigo with melodic.

edit flag offensive delete link more

Comments

thanks for your help,its worked

ahmet gravatar image ahmet  ( 2022-04-14 00:36:30 -0500 )edit

I'm facing the same issue when I reinstall rosserial (https://github.com/ros-drivers/rosserial)

ahmet gravatar image ahmet  ( 2022-04-19 06:43:11 -0500 )edit

i install this link

ahmet gravatar image ahmet  ( 2022-04-19 06:43:42 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-04-12 01:40:51 -0500

Seen: 536 times

Last updated: Apr 13 '22