MGS1600GY Magnetic Sensor ROS Package

4 years 11 months ago - 4 years 11 months ago #29534154 by ShadoSG
Hi,

We are currently running a MGS1600GY magnetic sensor and it communicates with an arduino with RS232. But we would also like to pull data directly from the magnetic sensor to a PC running Linux and ROS. The current problem we are facing is if we program the arduino to send magnetic readouts to the PC, we can only achieve some 16 to 25Hz which is too slow of a refresh rate. Is there a way to send data simultaneously to both devices?

Also, is there an ROS package for MGS1600GY?

We would appreciate your help :)

Please Log in or Create an account to join the conversation.

4 years 11 months ago #29534161 by Gabriel_Isko
Replied by Gabriel_Isko on topic MGS1600GY Magnetic Sensor ROS Package
There isn't a great way to do this since all the Arduinos I know of are just too limited when it comes to IO. I think the best way to do it would be to actually use your PC as the host device and relay serial values from our sensor through your PC instead of routing them through the Arduino. If you only need the tape position on the arduino, you could read it over our Analog output, but your digital communication options are very limited.

As far as a ROS package goes, I don't currently know of one for the MagSensors, but we are working on an overhaul for our external API support, so we should put something out in the coming months.

Please Log in or Create an account to join the conversation.

4 years 11 months ago #29534167 by ShadoSG
Thanks for sharing this information.

However our system was quite established when we encountered this issue. Right now we are looking into monitoring data from RS232 with both the PC and the arduino. Is there a way to set the MGS1600GY to a broadcast mode so there will always be data streaming out of RS232 without request?

Additionally, we are also trying to adopt N-Pole magnetic marker with S-Pole guidance tape in the middle. But distinguishing left from right relative to the center S-pole tape was proven to be challenging since the lateral wandering of the AGV will not put the S-pole strip in the middle at all time and randomly cause the marker tape to escape sensor range. Buried wires also caused random false readings. Is there a section of sample script that you can introduce to help with filtering?

Please Log in or Create an account to join the conversation.

4 years 11 months ago - 4 years 11 months ago #29534170 by Gabriel_Isko
Replied by Gabriel_Isko on topic MGS1600GY Magnetic Sensor ROS Package
You can accomplish the auto broadcasting using a MicroBasic Script . It would actually be very simple:
top:
print("Serial Information goes here!")
wait(25)
goto top

As far as the filtering goes, it get's very tricky to filter false readings. You can work on using a kalman filter , however you will definitely have to implement that on your host system. The best way is still to insure during installation that there is no oustide noise. If magnetic noise is impossible to get rid of due to your operating environment, I would recommend considering our Optical Tape Sensor , which is a drop in replacement for our magnetic sensor.

Although, do you think you can clarify what you mean by making the marker to escape the sensor range? You should be placing the markers very close to the guide tape, and this should only happen during extreme turns.

Please Log in or Create an account to join the conversation.

4 years 11 months ago #29534172 by ShadoSG
What is the recommended magnetic marker laying distance to the main tape? Currently we are using 30mm magnetic tape, and separation between center guidance tape and two marker tapes to its side ranges from 25mm to 35mm. The AGV always tend to sway side to side with a payload on it (we know it's a PID issue but there's only this much torque a hub motor can provide) and will result in the marker tape reaching the extreme edge of the sensor.

Please Log in or Create an account to join the conversation.

4 years 11 months ago #29534175 by Gabriel_Isko
Replied by Gabriel_Isko on topic MGS1600GY Magnetic Sensor ROS Package
Yes, that is about the distance we have them from our track.

I see your dilemma - especially on straight always your AGV should be able to control is position much more precisely so that there is no swaying. There are a few steps we can take to ensure this, but you are right. At a certain point your robot may be swaying because your motors can't output enough torque. You are correct that this is a limitation of hub motors too, since they aren't geared motor drives so their torque output is usually limited.

The first thing to do is to make sure your motor output is operating in closed loop speed mode, which runs a control loop on the motor speed. Just make sure you aren't running in open loop mode, as the AGV performance is dependent on the payload in open loop. If your AGV is not able to control it's orientation on straight aways in closed loop speed mode, then we should examine your closed loop PID gains, and review the payload requirements of your AGV as well as the hub motor specifications to make a determination if they are undersized.

If all else fails, the bottleneck on our sensor performance will be it's width. A wider sensor will be able to handle higher amounts of error while still keeping track of the tape. Please let me know the width of the sensor you are using, and take a look at our MGSW3200 and MGSW4800 offerings.

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds