ROS TeleOP not working.

462 views
Skip to first unread message

John Tilghman

unread,
Mar 22, 2016, 5:13:44 PM3/22/16
to ROS for Arlobot
I think I am on the right track, but have some minor things that are not working yet.

So, I have followed these instructions:

Build a Robot!

Building

Quick Install:

bash <(wget -qO- --no-cache https://raw.githubusercontent.com/chrisl8/ArloBot/master/setup.sh)

Quick Start:

Run:

~/catkin_ws/src/Metatron/startRobot.sh

Full Arlobot Setup Instructions:

Complete setup and usage instructions are at my blog: http://ekpyroticfrood.net/?p=162

Serial Interface and Propeller Code Testing

It is a good idea to irst test your serial interface to the propeller board:

cd ~/catkin_ws/src/Metatron/scripts/
./direct2PropSerialTest.sh

This will make a direct serial connection to the Propeller Activity board.

It will reset the Prop board and then start spitting out:

i 0

Then paste the line suggested by the script to initialize the program and it should start sending odometry info in the form of:

o       0.000   0.000   0.000   0.000   0.068   0.000   {"p0":135,"p1":90,"p2":78,"p3":78,"p4":107,"p5":34,"p6":15,"p7":11,"p8":16,"p9":67,"p10":77,"p11":120,"p12":9,"p13":10,"i0":1991,"i1":212,"i2":153,"i3":82,"i4":99,"i5":24,"i6":25,"i7":12}

With the occasional:

s       1       1       0       100     10      12      0.05    0.06    0    0

If you want to get really fancy you can even send it twist commands from the terminal too! Just remember to turn on the motors first for that to work!

Twist command format:

s,0.0,0.0

where the first number is the linear meters per second and the second number is the angular radians per second of a standard ROS "Twist" message.

Slow Forward:

s,0.100,0.000

Slow Reverse:

s,-0.100,0.000

Slow turn left or right:

s,0.00,0.50
s,0.00,-0.50
And it works, the BOT will move and the PINGS, ping.
But I cannot get the web panel to talk to the BOT.
So I tired:
Basic TeleOp use:
roslaunch arlobot_bringup minimal.launch --screen
<New Terminal>
roslaunch arlobot_teleop keyboard_teleop.launch

But the BOT will not move using Teleop, so I am not sure where to look or what to do.

Chris L8

unread,
Mar 23, 2016, 1:28:39 PM3/23/16
to ROS for Arlobot
Did you get any further with this yet?

I would start the teleop and then in another window list topics with "rostopic list"
Then use "rostopic echo <topic name>" to watch what is on some of the topics.
Look at the topics related to serial and teleop input/output.

John Tilghman

unread,
Mar 23, 2016, 1:42:52 PM3/23/16
to Chris L8, ROS for Arlobot
No further with this yet.

I have looked at the other topics, and I went thru the Arlobot_node code as well as the prop side.

I read in the code where you combine the output of the encoders and the PINGS and the IR, but when I read the ROS side of the code I couldn't find where you split that out.

So I was unsure of what topics you are publishing this under, also I saw the remap of CmdVel and was unsure why that was done.

There is a lot of moving parts with the code, and while I am getting a handle on some of it my thinking is that for the most part it should 'just work' as is.

It is a little easier to learn, if the model you use to learn works as expected. Troubleshooting as your learning, well that gives me a headache among other things.

So I will keep looking as best as I can.



--
You received this message because you are subscribed to a topic in the Google Groups "ROS for Arlobot" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ros-for-arlobot/WY83LLnRcm8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ros-for-arlob...@googlegroups.com.
To post to this group, send email to ros-for...@googlegroups.com.
Visit this group at https://groups.google.com/group/ros-for-arlobot.
To view this discussion on the web visit https://groups.google.com/d/msgid/ros-for-arlobot/70d0b2fa-fa2b-45d4-b311-77eb559cf66d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris L8

unread,
Mar 23, 2016, 1:50:29 PM3/23/16
to ROS for Arlobot
Can you post some of the output from running ./direct2PropSerialTest.sh

The output from that will show if there is any issue with the PING or IR sensor data causing the robot to stall.

The code allows the robot to turn in place even when PING sensors show an obstacle, but the teleop command may not be sending an exact rotation. It might be sending more of a curve, which will not work if the code on the Propeller board thinks it is blocked.

Usually this is indicated by one of the ping sensor outputs "p#:??" having a zero value after the colon.

It may be that you need to edit the per_robot_settings_for_propeller_c_code.h files in the .arlobot folder to fix the number of ping sensors connected.
Or, if that is correct,it could be a PING sensor is not connected properly? Sometimes that happens to me, although it should be obvious if the green light in the PING sensor is not flashing.

Again, post some output from running ./direct2PropSerialTest.sh
That will help a lot.

Also, if you want to see the serial output while trying to run the teleop you can echo the serial topic like this:
"rostopic echo serial"
As long as ROS is all running, that should work.

John Tilghman

unread,
Mar 23, 2016, 4:00:32 PM3/23/16
to Chris L8, ROS for Arlobot
Here is the output.

I will try the "rostopic echo serial" now..


--
You received this message because you are subscribed to a topic in the Google Groups "ROS for Arlobot" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ros-for-arlobot/WY83LLnRcm8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ros-for-arlob...@googlegroups.com.
To post to this group, send email to ros-for...@googlegroups.com.
Visit this group at https://groups.google.com/group/ros-for-arlobot.
Prop-SerialOut.log

John Tilghman

unread,
Mar 23, 2016, 4:05:50 PM3/23/16
to Chris L8, ROS for Arlobot
Ok, I have done the: rostopic echo serial

It looks like the data from the terminal screen and the logfile.

When I am on the teleop screen and pressing or holding i, or any of the other move keys.

I would expect to see something change in the data from serial, but nothing changes as far as the movement data.

John Tilghman

unread,
Mar 23, 2016, 4:15:10 PM3/23/16
to Chris L8, ROS for Arlobot
Ok and here is a logfile when using the Joystick teleop.

Things do seem to change in this one, but still no BOT movement.

Prop-Serial-JoystickOut.log

John Tilghman

unread,
Mar 23, 2016, 7:45:09 PM3/23/16
to Chris L8, ROS for Arlobot
Ok,

It WORKS !

But to get it working I had to do some tom foolery with the USB relay board.

I went ahead and hooked the power to the USB board and the USB cable from the laptop, but I didn't run the motor controller cables thru it.

Edit the yaml file as needed to see the relay, and restarted everything.

The web control now comes up, it starts ROS when asked, and moves the robot using the teleop screen.

So far so good, but shutting down isn't as smooth, it seems to get hung after the relays and must be CTYL-C'ed to exit back to command line.

John Tilghman

unread,
Mar 23, 2016, 7:57:24 PM3/23/16
to Chris L8, ROS for Arlobot
UPDATE !

The web control panel/teleop works, but starting roscore and keyboard or joystick teleop dosn''t work

So this:

Basic TeleOp use:
roslaunch arlobot_bringup minimal.launch --screen
<New Terminal>
roslaunch arlobot_teleop keyboard_teleop.launch
Nor this works:
Remote Control with an xBox 360 joystick:
http://ekpyroticfrood.net/?p=115
roslaunch arlobot_bringup minimal.launch --screen
<New Terminal>
rosparam set /joystick/dev "/dev/input/js0"
roslaunch turtlebot_teleop xbox360_teleop.launch --screen
Any ideas ?

Chris L8

unread,
Mar 24, 2016, 10:14:31 AM3/24/16
to ROS for Arlobot
The "rostopic echo serial" output looks great.

These are the lines where ROS is telling the robot to "move":
data: 6784, out: s,0.0,0.0

Except that since it is 0.0, 0.0 ROS is saying "be still".

I would look at "rostopic list" and see what "cmd" topics there are and see if you can find more than one that are sending twist commands.

Unfortunately my robot is disassembled at the moment so it is hard for me to start it up to remember what the output looks like.
There will be a topic that tells you which topic is in control of the robot,
and also various topics that may be sending output.

The main reason I built the web interface is that because ROS has so many moving parts the web interface made it easier to see what is going on without having to run dozens of commands. So if the web interface works, you are in a good place.
I know it is a bit of a mess because I was learning a lot when I built it and it has two different parts. I have plans to rebuild it, but it will take some months.

jsam...@pobox.com

unread,
Mar 24, 2016, 11:00:32 AM3/24/16
to ros-for...@googlegroups.com
[I don't have an Arlobot, but I'll make some suggestions.]

Check to see if your joystick is actually js0. My laptop [HP ProBook 450]  has a built-in accelerometer that shows up as js0. Then the joystick shows up as js1.

Let's see, how do you verify that? You use the command:

ls /dev/input

If you have a js0 when the joystick is not plugged in then you probably have something else pretending to be a joystick. Then plug in your joystick and see if js1 shows up.

I used a Linux command to display the joystick output, but I don't remember what it was. It showed the numbers changing when I moved the joystick.

Also, you have to push one of the buttons on the joystick before the teleop node will start publishing cmd_vel messages.

Maybe this was already mentioned... but you should be able to view ROS joystick messages "rostopic echo joystick" (or whatever your joystick message is named). And you should be able to do "rostopic echo cmd_vel" to see if the teleop node is publishing cmd_vel messages.

Another annoyance... if my joystick is plugged in when I boot the computer then it shows up as js0 and the accelerometer shows up as js1. There be some Linux magic to force the order (udev?).

- Jeff


From: John Tilghman <john.t...@gmail.com>
To: Chris L8 <ekpyrot...@gmail.com>
Cc: ROS for Arlobot <ros-for...@googlegroups.com>
Sent: Wednesday, March 23, 2016 6:57 PM
Subject: Re: [ros-for-arlobot] Re: ROS TeleOP not working.
Reply all
Reply to author
Forward
0 new messages