ros-drivers / rosserial

A ROS client library for small, embedded devices, such as Arduino. See: http://wiki.ros.org/rosserial
508 stars 527 forks source link

output_path missing "/" for "copy ros_lib stuff" #501

Open elXaptation opened 4 years ago

elXaptation commented 4 years ago

Not exactly sure what happened in https://github.com/ros-drivers/rosserial/pull/495/commits/c7cd984e1dc53e64b7f9323c09a1a7c7c2c09416 but I needed to add a "/" to line-80 "output_path = os.path.join(sys.argv[1], "ros_lib/")" so make_libraries.py will copy and find files in to the Arduino/libraries/ros_lib directory.

mikepurvis commented 3 years ago

@stertingen I know we mass-updated this in #495. Can you revisit and see if it needs to be updated everywhere to include the trailing slash? Or perhaps update rosserial_client_copy_files so that it does the right thing regardless of the trailing slash being there or not?

stertingen commented 3 years ago

I cannot reproduce this behavior. Looking at rosserial_client_copy_files I wonder how this can go wrong, because the path (the one that appears to miss a trailing /) that is passed into the function is concatenated with subdirectories again, also using os.path.join(). Unless there is a leading / in a path component, os.path.join just eliminates intermediate slashes.

@elXaptation What python version do you use?

elXaptation commented 3 years ago

I'm using Python 2.7.17 for the work related to ros-drivers/rosserial

On Sun, Aug 23, 2020 at 12:14 PM Hermann von Kleist < notifications@github.com> wrote:

I cannot reproduce this behavior. Looking at rosserial_client_copy_files I wonder how this can go wrong, because the path (the one that appears to miss a trailing /) that is passed into the function is concatenated with subdirectories again, also using os.path.join(). Unless there is a leading / in a path component, os.path.join just eliminates intermediate slashes.

@elXaptation https://github.com/elXaptation What python version do you use?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ros-drivers/rosserial/pull/501#issuecomment-678812874, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXNTRWKGXDLQICTWCDBFELSCFTCZANCNFSM4NZ5GX6A .