Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the Teensy serial port for rosserial #1

Open
nbaddorf opened this issue Dec 22, 2020 · 6 comments
Open

How to change the Teensy serial port for rosserial #1

nbaddorf opened this issue Dec 22, 2020 · 6 comments

Comments

@nbaddorf
Copy link

Hi, I have been working with the RUR programs for a couple of days and they work great! I would like to wire my teensy 4.1 to a raspberry pi for serial, rather than using usb. I tried to follow the rosserial tutorials on changing the wired serial port, but it throws me lots of errors, I am guessing this is because of the modified library. Does anyone know how I could change the teensy serial port used? Thanks!

@XRobots
Copy link
Owner

XRobots commented Dec 22, 2020

In here: https://github.com/XRobots/ReallyUsefulRobot/blob/main/ROS/rur/launch/rur_bringup.launch you can change the port name from /dev/ttyACM0 to something else, maybe /dev/ttyUSB0 ?

You may also have to do: sudo chmod 777 /dev/ttyUSB0 to give access.

@nbaddorf
Copy link
Author

Sorry, I guess I didn't explain well enough. I would like to change how the teensy is wired to the raspberry pi. I don't want to use the teensy over usb cable. I would like to wire the teensy to the rpi over serial2.

@XRobots
Copy link
Owner

XRobots commented Dec 22, 2020

I guess you'd have to hack the rosserial library to use a different serial port.

@nbaddorf
Copy link
Author

I did try to use that, and rosserial actually has a tutorial on how to do that, which I tried, but it gives me errors, due to, I'm guessing, the mods you did the library. Here is the link to that tutorial: http://wiki.ros.org/rosserial_arduino/Tutorials/NodeHandle%20and%20ArduinoHardware

@XRobots
Copy link
Owner

XRobots commented Dec 22, 2020

Changes I made were to https://github.com/ros-drivers/rosserial/blob/melodic-devel/rosserial_arduino/src/ros_lib/ArduinoHardware.h to add "defined(IMXRT1062)" with the other hardware.

I also modified the buffer size in node_handle.h as per : https://answers.ros.org/question/73627/how-to-increase-rosserial-buffer-size/

@nbaddorf
Copy link
Author

Ok, thanks! I guess this bug is part of the rosserial library then, not due to the teensy stuff. Thanks for your help, I will keep you posted when I figure out the answer! By the way, I am a huge fan so this is super cool getting to ask for help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants