I realize that the sensor takes reading from 0 angle moves to max_angle, then the min_angle and the 0 angle of the ping360 sonar sensor is right where the cable goes into the module. I wanted to inquire whether there exists a way to change where the 0 degree of the angle is.
At the end of the day, I want to scan just the 180 degrees that’s opposite to where the cable goes in.
Try using SonarView with the Ping360, it allows you to set the sector size as well as direction.
Thanks! This does exactly what I wanted.
Although, I’d like to know the if the direction setting can be set in code from the ping360_sonar ROS driver.
Hi @tonyj, welcome to the forum
The ping protocol does not have a command for changing the 0 angle of a Ping360, but
device_data requests specify the angle to get a profile from, so whichever software you’re using is already manually requesting the direction for each profile, which means requesting a particular angle range needs to be done within the software you’re using.
I don’t have experience with this driver, but I’d suggest checking what options it provides, because I’d assume it either allows directly requesting one profile at a time at user-specified angles (in which case you can just manually cycle through the angles you want), or it might provide start and end points for an angular range, in which case it can do the iterating and cycling for you
Thanks for the input.
My workaround solution was to write the code in such a way that it scans from 0 goes to max_angle, then restrict the min_angle to whichever min_angle I want to scan between. In my findings, as long as the driver starts from 0, any restraint can be applied after that.
I’m not really sure what you mean by this, or why starting from 0 would be required - the sensor should be fine receiving arbitrary angle requests (e.g. you could request profiles at 10, 312, 218, 398, then 50 gradians and it should just provide those).
Maybe there’s some weird requirement in the ROS driver or something, but it’s at least not a require of the ping protocol or the Ping360 device.
Anyway, it’s good that you seem to have resolved your issue