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

How can a PIC18F4550 communicate with ROS?

asked 2012-06-05 03:40:46 -0500

Engineer gravatar image

Hello, I am using a PIC18F4550 microcontroller for controlling a stepper motor and a regular dc motor through their drivers (H-bridges). I was wondering if anyone knows a simple way to make ROS communicate with the microcontroller. I know that one way to do this is to buy an arduino chip and follow the tutorials on this website. Then write a simple code to make the arduino chip communicate with the PIC microcontroller. Unfortunately, due to budget limit and lack of time this is not possible. I would be really greatfull if anyone could help me soon.

Thanks in advance.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2012-06-05 04:36:32 -0500

dornhege gravatar image

Two ways:

  1. Implement the rosserial protocol on the PIC and use rosserial client to communicate with ROS. More generic and more work (you can probably reuse some code from rosserial_arduino).
  2. Implement your own simple protocol and write a client nodes that maps this to ROS. Limited to what you implement, but quick to do.
edit flag offensive delete link more
0

answered 2012-06-05 12:25:00 -0500

Mr.EEPBppt gravatar image

I have made some robots with pics, and it would be great to interface them with ROS, I was wondering if there is a library (like ros.h in the arduino) for the microchip c30 compiler?

edit flag offensive delete link more
0

answered 2012-06-05 06:37:52 -0500

Engineer gravatar image

Thanks, I will try the first method. But can you tell me if there is any chance that I would mess up the microcontroller if I implement the protocol in the wrong way, or by writting any other code wrong?

edit flag offensive delete link more

Comments

I'm not really sure, what you mean with "mess up". Obviously you're changing code, but the serial line itself is kinda safe, if you send wrong data.

dornhege gravatar image dornhege  ( 2012-06-05 06:46:50 -0500 )edit

@Engineer please use the comments to follow up on posts and also accept @dornhege's answer so others know you got what you were looking for.

tfoote gravatar image tfoote  ( 2012-06-07 10:20:25 -0500 )edit

I haven't checked if his suggestion works. I decided that I will use an arduino chip to connect it with ROS and also connect it with the PIC. Seems to be easier

Engineer gravatar image Engineer  ( 2012-06-08 02:53:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-06-05 03:40:46 -0500

Seen: 1,462 times

Last updated: Jun 05 '12