0
$\begingroup$

Rosanswers logo

Steps taken so far:

I have downloaded the raspberry pi image and VM image as per: http://wiki.ros.org/ROSberryPi/Installing%20ROS%20Kinetic%20on%20the%20Raspberry%20Pi

https://downloads.ubiquityrobotics.com/

pi image extracted to raspberry pi 3 B+.

VM image extracted to Oracle VM VirtualBox

I installed the create_autonomy package: http://wiki.ros.org/create_autonomy

I created a cable from Create 2 DIN plug to the pi USB using FTDI level shifter from 5V (create 2) to 3.3V (raspberry pi).

I turn on the create 2 and plug in the serial/USB cable from the create 2 and the pi, and type:

ls /dev

it returns ttyUSB0

typing:

lsusb

returns the FTDI controller info

I run the roslaunch ca_driver create_2.launch from the VM (ssh'd to the raspberry pi), but it does not connect to the Create 2.

getting this error:

[create::Serial] failed to receive data from Create. Check if robot is powered!

On the FTDI controller, I can see the send and receive LED lights light up when the program is sending data to the create 2.

I have checked the cable pinout and verified TX and RX are correct. Also checked for continuity of the TX and RX wires with a ohm meter.

I download, extracted and ran the Create2CSharp_DrivingProgram.exe as per the pdf and it works fine. https://docs.google.com/viewer?url=https%3A%2F%2Fwww.irobotweb.com%2F-%2Fmedia%2FMainSite%2FPDFs%2FAbout%2FSTEM%2FCreate%2FCreate_2_Tethered_Driving_2.pdf

running roslaunch ca_driver create_2.launch from terminal...

ubuntu@buddybot:~/create_ws/src/create_autonomy/ca_driver/config$ roslaunch ca_driver create_2.launch
... logging to /home/ubuntu/.ros/log/6fb2a544-d0dc-11e5-a2fa-c9da98e38caa/roslaunch-buddybot-2311.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; please use xacro instead
started roslaunch server http://buddybot.local:44067/

SUMMARY
========

PARAMETERS
 * /ca_driver/base_frame: base_footprint
 * /ca_driver/dev: /dev/ttyUSB0
 * /ca_driver/latch_cmd_duration: 0.2
 * /ca_driver/loop_hz: 10.0
 * /ca_driver/odom_frame: odom
 * /ca_driver/publish_tf: True
 * /ca_driver/robot_model: CREATE_2
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    ca_driver (ca_driver/ca_driver)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)

ROS_MASTER_URI=http://buddybot.local:11311

process[ca_driver-1]: started with pid [2331]
process[robot_state_publisher-2]: started with pid [2333]
[ INFO] [1577558516.039614572]: [CREATE] "CREATE_2" selected
[create::Serial] failed to receive data from Create. Check if robot is powered!
[create::Create] retrying to establish serial connection...
[create::Serial] serial error - Operation canceled
[create::Serial] failed to receive data from Create. Check if robot is powered!
[create::Create] retrying to establish serial connection...
[create::Serial] serial error - Operation canceled
[create::Serial] failed to receive data from Create. Check if robot is powered!
[create::Create] retrying to establish serial connection...
[create::Serial] serial error - Operation canceled
[create::Serial] failed to receive data from Create. Check if robot is powered!
[create::Create] failed to connect over serial: timeout
[create::Serial] serial error - Operation canceled
[create::Serial] failed to receive data from Create. Check if robot is powered!
[FATAL] [1577558561.081052080]: [CREATE] Failed to establish serial connection with Create.
[create::Serial] send failed, not connected.
[ca_driver-1] process has finished cleanly

Found the log: /home/ubuntu/.ros/log/6fb2a544-d0dc-11e5-a2fa-c9da98e38caa/roslaunch-buddybot-2311.log

I reviewed the log, and only one ERROR is generated:

[roslaunch][ERROR] 2019-12-28 13:33:03,228: [ca_driver-1] escalating to SIGTERM

Reading some other questions related to pi ttyUSB0, I ran this:

/dev/ttyUSB0

and it returned this:

-bash: /dev/ttyUSB0: Permission denied

Ran this:

groups ubuntu

Returned this:

ubuntu : ubuntu adm tty dialout cdrom floppy sudo audio video plugdev users input ssl-cert bluetooth gpio i2c spi

I verified the dialout group exists:

Ran:

groups

Returned this:

ubuntu adm tty dialout cdrom floppy sudo audio video plugdev users input ssl-cert bluetooth spi i2c gpio

Ran this:

sudo chmod 666 /dev/ttyUSB0

sudo chmod 666 /dev/tty

logged out, logged in, but still get the permission denied.

Ran this:

sudo chmod 777 /dev/ttyUSB0

Logged out, logged in, can run /dev/ttyUSB0 now, and run "roslaunch ca_driver create_2.launch" in another terminal.

When "roslaunch ca_driver create_2.launch" is run, the other terminal running /dev/ttyUSB0 displays:

-bash: /dev/ttyUSB0: **Permission denied**

Ran:

sudo usermod -a -G tty ubuntu
sudo usermod -a -G dialout ubuntu

but no help, "roslaunch ca_driver create_2.launch" still fails to connect.

Ran this again:

/dev/ttyUSB0

returns

-bash: /dev/ttyUSB0: Permission denied

So, I think it is something with permissions on ttyUSB0

I found this for same/similar issue with turtlebot: https://answers.ros.org/question/11185/cant-access-turtlebot-through-ttyusb0/?answer=3582%3Fanswer%3D3582#3582

Instructing to add this:

#serial usb
SUBSYSTEM=="usb", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", MODE="0666", GROUP="turtlebot"

Following the answer, I found /etc/udev/rules.d/99-com.rule.

I verified the product and vendor with lsusb

Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

Contents of 99-com.rule after adding the line:

SUBSYSTEM=="input", GROUP="input", MODE="0660"
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"

SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
        chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\
        chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\
        chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
'"

KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
        ALIASES=/proc/device-tree/aliases; \
        if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
                echo 0;\
        elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
                echo 1; \
        else \
                exit 1; \
        fi\
'", SYMLINK+="serial%c"

KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
        ALIASES=/proc/device-tree/aliases; \
        if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
                echo 0; \
        elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
                echo 1; \
        else \
                exit 1; \
        fi \
'", SYMLINK+="serial%c"

#serial usb
SUBSYSTEM=="usb", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", MODE="0666", GROUP="ubuntu"

Question: What GROUP should be added to #serial usb line?

the user?

ttyUSB0?

tty?


Originally posted by lotharchris on ROS Answers with karma: 16 on 2019-12-28

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

After troubleshooting with realterm, I determined the create 2 cable that came with my create 2 was bad. The receive channel/wire had intermittent connection. I contacted irobot support, they sent me a new cable, and the create 2 connects now and shows the battery level.


Originally posted by lotharchris with karma: 16 on 2020-01-06

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.