creating reverse serial port from ros data

asked 2019-07-20 03:03:24 -0500

wintermute gravatar image

Hello,

I want to write a small python program, that will subscribe to /imu/rawdata topic, grap the contents, and then format it to a special string, and then send it out from a virtual serial port.

I would like to do this, so I can use custom calibration software for the imu and magnetometer, without removing the imu from my robot. The calibration software is at https://www.pjrc.com/store/prop_shiel...

I did some preliminary research, and found out that linux program socat, can accept connections at tcp:8080 and then send it to a virtual serial port. There is the relevant info for the socat: https://github.com/swinton/Virtual-Se...

I know it can be done, but I dont know which path to follow.

Any ideas/recomendations/help greatly appreciated.

Best Regards, C.

edit retag flag offensive close merge delete

Comments

1

Running serial data over TCP/IP or UDP is very widely supported on various OS. I would recommend you investigate that. Googling with keywords such as "linux serial port tcp/ip" returns quite a few results. socat is only one option.

Provided you can run those tools on the PC / machine / board that is connected to your IMU, this would not need any ROS (I would in fact recommend to not use ROS for this). As such, it would not be a ROS problem and your post would be off-topic for this forum.

gvdhoorn gravatar imagegvdhoorn ( 2019-07-20 04:20:33 -0500 )edit