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

socat pseudoterminals with ROS or rosbridge? [closed]

asked 2014-01-19 09:01:20 -0600

morrowsend gravatar image

updated 2014-01-19 14:10:38 -0600

EDIT: I am running linuxMint Lisa with ROS Groovy

I am trying to connect the output of the roomba driver in ROS to a software that can read a serial port. I created a pair of pseudoterminals that are nulled together. I then created some symbolic links to nonsense USB ports such as /dev/ttyUSB21, ttyUSB22. It is simple to test that these work correctly on their own by using the following code in two separate terminals:

cat /dev/ttyUSB22

Then in another terminal:

sudo echo "hello world..." > /dev/ttyUSB21

The message sent to ttyUSB21 prints from ttyUSB22 as I expect. Messages can be sent the other direction as well (from USB22 to USB21).

I am trying to connect the brown university roomba driver to one of these port, ttyUSB21 for instance. This way, I can attach my other custom software to ttyUSB22, and read in the messages sent by the roomba driver. This other software is a simple roomba simulator I am writing. You should be able to connect to it the same as you would a real roomba, through a serial port (in this case, the pseudoterminals).

I expect a ROS message to use the following path:
usercode-->ROScore-->brown roomba driver--> ttyUSB21 -->ttyUSB22 --> my Simulator.

To test this, I am replacing "my Simulator" in the above with a "cat /dev/ttyUSB22" just to see it print out the message. For some reason I am not able to get anything coming out the cat command when I run my simple usercode.

I can't seem to find any info on how I might get this to work otherwise, and there isn't a lot of data (that I can find at least) about ROS interacting with psedudoterms.

I have seen a little about rosbridge, but I'm not sure if it can do what I need and if so, how I might get it to work.

Any help would certainly be appreciated!

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2016-08-14 01:32:09.562091

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-02-04 06:26:31 -0600

morrowsend gravatar image

UPDATE: still having problems.

I now have my pseudoterminals nulled together. I have tested this with Brown university's irobot_create_2_1 driver.py. I am selecting the correct port, etc. When I run the driver.py on the other end of my pseudoterminals, I get two hex values from driver.py: 80 07 which is a request for the cliff and bump sensors. Regardless of what I return I get nothing back.

When I snoop in on communications to a REAL irobotCreate (just changing the serial port in driver.py) I sniff 0xfd from the driver.py on startup. I then get a reply from the iRobotCreate containing something similar to the following: 5e 72 0a be b0

Why would the driver.py send different bytes to the real serial port than my pseudoterminals? How does that even make sense?

Anyway,I think that since I have socat relaying at least something now, that the above can be "solved" though I might start a new question thread with the new issue I am having.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2014-01-19 09:01:20 -0600

Seen: 351 times

Last updated: Feb 04 '14