Pioneer Hex Command codes help [closed]

asked 2020-05-06 02:43:57 -0600

updated 2020-05-06 03:10:46 -0600

gvdhoorn gravatar image

Hi

my research institute as inherited a handful of ActivMedia Pioneer 3 and PeopleBots. We are stripping out the old computers and replacing with Jetson Nano's and running AI, Neural Network and robot control scripts in Python (Jetson = Ubuntu).

The Python scripts communicate directly with the Pioneer via serial port dev/ttyUSB0 sending command byte messages.

So far we have been able to establish comms, get SIP streams, and close down correctly.b

But we can not get the bots to move. Can anyone help us with the Hex commands.

Here is our work so far: (sending initial SYNC codes - this bit works successfully)

0xFA, 0xFB, 0x03, 0x00, 0x00, 0x00
--- wait for echo ---
0xF, 0xFB, 0x03, 0x01, 0x00, 0x01
--- wait for echo---
0xFA, 0xFB, 0x03, 0x02, 0x00, 0x02
--- wait for echo and name, class, sub class

(sending server initialisation)
0xFA, 0xFB, 0x03, 0x01, 0x00, 0x01
(and motor enable commands # 4)
0xFA, 0xFB, 0x06, 0x04, 0x3B, 0x01, 0x00, 0x00, 0x40

[so far so good. we get a stream of SIP from the robot. But when we try to get it to move nothing happens e.g this command 'should' rotate the chassis 20 degrees per sec. But nothing

0xFA, 0xFB, 0x06, 0x15, 0x3B, 0x20, 0x00, 0x00, 0x70

e.g. this command 'should' open the gripper paddles. But nothing

0xFA, 0xFB, 0x06, 0x21, 0x3B, 0x01, 0x00, 0x00, 0x5D

Or translation of the various legacy manual are that client command codes need the following constructors:

<header - 2bytes> <byte count - 1 byte> <command code - 1 byte> <arg type - 1 byte> <arg - 2 bytes> <checksum - 2 bytes>

therefore rotate should be:

<0xFA, 0xFB> <0x06> <0x15> < 0x3B ( = positive integer)> <0x20, 0x00 (= 20 degrees/sec)> <0x00, 0x70>

... have we got the checksum incorrect? is there another stage missing? Any help truly appreciated (it is driving us nuts!)

regards Craig Vear Institute of Creative Technologies, De Montfort University

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see http://wiki.ros.org/Support for more details. by gvdhoorn
close date 2020-05-06 03:14:12.856828

Comments

I can see why you'd post this here, but unfortunately your question doesn't seem ROS related (as you mention, you're going for pure Python scripts to interact with the hardware/embedded controller).

As we have to stay on-topic here on ROS Answers, I'm closing your question as off-topic. That's not because it is not a valid question, but because it is not about ROS, which is what ROS Answers is about.

What I could suggest is perhaps to look at packages like ROSARIA and others which interface with Pioneer robots. Some may use (closed source) libraries to do the heavy lifting, but there may be some which have overcome the issues you're running into. All would be interesting I would say to increase your understanding of the platform and robots.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-06 03:14:03 -0600 )edit

Completely understand. Apologies.

Craig vear gravatar image Craig vear  ( 2020-05-06 04:17:59 -0600 )edit

No need to apologise.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-06 06:17:38 -0600 )edit