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

newbie77's profile - activity

2021-04-09 03:20:27 -0500 received badge  Famous Question (source)
2021-04-09 03:20:27 -0500 received badge  Notable Question (source)
2021-04-09 03:19:39 -0500 received badge  Famous Question (source)
2021-04-09 03:19:39 -0500 received badge  Notable Question (source)
2021-02-23 13:28:03 -0500 commented question "Unable to locate package" for every package I try to install (RPi, Debian Buster)

Will do, thank you. Good to know on ROS-1 and 20.10

2021-02-23 13:16:09 -0500 received badge  Popular Question (source)
2021-02-23 13:10:03 -0500 commented question "Unable to locate package" for every package I try to install (RPi, Debian Buster)

Thank you, I missed those. My interpretation is that the packages will not work as my OS is 32 bit. If this is correct

2021-02-23 08:55:30 -0500 asked a question "Unable to locate package" for every package I try to install (RPi, Debian Buster)

"Unable to locate package" error on Raspberry Pi for every package I try to install I am attempting to add packages to

2021-02-08 08:46:42 -0500 edited answer SyntaxError in tcpros_base (Noetic, RPi, Python)

In case anyone else runs into this issue, my raspberry pi was running python2 and rospy needs python3, at least for Noet

2021-02-08 08:38:16 -0500 marked best answer SyntaxError in tcpros_base (Noetic, RPi, Python)

I am new to ROS and am probably making an obvious mistake. I am running Noetic on Raspberry Pi 4 and it appears to have installed correctly. Specifically, I am trying to build a very simple node (based on an UDemy class) and keep getting rospy issues (or at least I think rospy issues).

Here is an outline of what I have done. I have tried many permutations and continue to get the same error. 1. catkin_make (run in catkin WS folder)

  1. catkin_create_pkg (run in SRC folder)

  2. Added scripts folder to the package folder

  3. Ran catkin_make (tired this step and left out but error is the same)
  4. Ran ". ~/ros_catkin_ws/devel/setup.bash" wile in catkin_ws folder because this seemed necessary based on what I read
  5. Used touch command to create python file
  6. Used chmod +x to make file executable
  7. Wrote python script that I copied from Udemy class (prints "Hello")
  8. Get the following error:

Traceback (most recent call last):
  File "my_first_node.py", line 3, in <module>
    import rospy
  File "/home/pi/ros_catkin_ws/devel/lib/python3/dist-packages/rospy/__init__.py", line 34, in <module>
    exec(__fh.read())
  File "<string>", line 49, in <module>
  File "/home/pi/ros_catkin_ws/src/ros_comm/rospy/src/rospy/client.py", line 60, in <module>
    import rospy.impl.init
  File "/home/pi/ros_catkin_ws/src/ros_comm/rospy/src/rospy/impl/init.py", line 54, in <module>
    from .tcpros import init_tcpros
  File "/home/pi/ros_catkin_ws/src/ros_comm/rospy/src/rospy/impl/tcpros.py", line 45, in <module>
    import rospy.impl.tcpros_service
  File "/home/pi/ros_catkin_ws/src/ros_comm/rospy/src/rospy/impl/tcpros_service.py", line 54, in <module>
    from rospy.impl.tcpros_base import TCPROSTransport, TCPROSTransportProtocol, \
  File "/home/pi/ros_catkin_ws/src/ros_comm/rospy/src/rospy/impl/tcpros_base.py", line 160
    (e_errno, msg, *_) = e.args
                   ^
SyntaxError: invalid syntax

Below is my python script for the node:

#!/usr/bin/env python3

import rospy

if __name__ == '__main__':
    rospy.init_node('my_first_python_node')
    rospy.loginfo("This node has been started")
rate = rospy.Rate(10)

while not rospy.is_shutdown():
    rospy.loginfo("Hello")
    rate.sleep()
2021-02-08 08:38:02 -0500 received badge  Popular Question (source)
2021-02-08 08:32:43 -0500 commented answer SyntaxError in tcpros_base (Noetic, RPi, Python)

You are correct, I meant Python 3. Thank you for catching my typo.

2021-02-08 08:28:28 -0500 received badge  Nice Answer (source)
2021-02-08 07:33:12 -0500 received badge  Self-Learner (source)
2021-02-08 07:33:12 -0500 received badge  Teacher (source)
2021-02-08 07:05:48 -0500 answered a question SyntaxError in tcpros_base (Noetic, RPi, Python)

In case anyone else runs into this issue, my raspberry pi was running python2 and rospy needs python2, at least for Noet

2021-02-05 08:46:10 -0500 commented question SyntaxError in tcpros_base (Noetic, RPi, Python)

Thank you! I was running Python 2. Also, I wan't sourcing the setup.bash every time I turned the Pi on.

2021-02-04 16:45:39 -0500 asked a question SyntaxError in tcpros_base (Noetic, RPi, Python)

rospy issues (noetic) I am new to ROS and am probably making an obvious mistake. I am running Noetic on Raspberry Pi 4