loading
 
SRV-1b laser control
Win Heagy from United States  [31 posts]
8 years
Has anyone been using laser control in the SRV-1b module (RR version 2.2.12)?  I created a laser variable and can toggle it between "on" and "" (I am displaying the variable to verify this).  According to the docs, this should switch the lasers on and off, but I'm not seeing this.  Using similar techniques, I am successfully controlling the motors.  I have the on/off variable in the SRV-1b module set to read the laser variable.  What am I missing?

Thanks -- Win
AB2312 from United States  [3 posts] 8 years
I've noticed the same thing.  It is extremely frustrating because fine control of the laser is essential for the type of distance estimation and surface orientation estimation that you would want to do with the SRV1.  You might be able to cheat somewhat by using the PushButton command, PushButton "Surveyor_SRV1b",{index},"Test".  This turns the laser on continuously which may or may not be what you want. Hopefully, someone more experienced with RobotRealm than I (I'm a newbie) can give us some tips on the proper way to do this or if it is possible at all.  It would be very disappointing if not.  I'm using RR v. 2.2.5 so hopefully this has been fixed or is slated to be fixed very soon.  By the way, have you been able to get the laser range variable to work?  That too seems to be broken at least for my version.

Andrew
Win Heagy from United States  [31 posts] 8 years
I'll try the PushButton command...thanks.  

I do want to use the range variable, but got derailed trying to turn the lasers on and off, so I haven't tried it.

Win
AB2312 from United States  [3 posts] 8 years
No problem.  With respect to the laser ranging, I am actually less concerned about that not working since I would probably want to write my own distance estimation routine using the laser spot module rather than rely on the built-in SRV1 command which might not be well calibrated anyway.  I've tried manually sending the laser range command (outside of Roborealm) and received an error message from the Matchport.  This suggests that the problem with the ranging is probably with the SRV1 itself and not Roborealm.  But this doesn't explain why the lasers can't be turned on an off with variables.  On the other hand, this suggests an alternative to the pushbutton strategy if you need the lasers on continuously for the entire roborealm session; instead of pushing the "Test" button continuously (which makes we worry that it could cause an overflow of some sort), you can command the SRV1 to turn on the lasers manually outside of Roborealm and then just use Roborealm for the image processing.

Andrew
Anonymous 8 years
Win,

We double checked the variable for use in turning the laser on and off and it appears to work correctly. Using "on" or "1" as the variables value will turn it on. Perhaps you can eliminate all modules except the SRV1 (assuming SRV1blackfin here) and use the Set_Variable module to create a "test" variable which is typed into the laser field. Included below is that robofile configured for our network. Can you give that one a try?

We also checked the range variable. While it works I'd probably not recommend it as it works in the following way:

1. Pulses left laser
2. Snaps a picture
3. Pulses right laser
4. Snaps a picture
5. Calculates distance between two spots

which works somewhat (assuming laser points are detected) but will REALLY slow down the streaming video (as it interrupts that process) AND will switch off the laser if you had it on (using the variable discussed above). So it doesn't seem that having the laser on AND checking for the range are compatible ... you can do one or the other ... but at the expense of fps on the range.

Hopefully this simple robofile will help determine what the actual issue is.

STeven.
program.robo
AB2312 from United States  [3 posts] 8 years
Thanks Steven, the robo file definitely helped.  The issue that I had, and maybe Win had the same issue, was that the laser_on_off variable mapping wasn't being set in the robo file even though it appeared that I set it using the SRV1b module gui interface.  When I manually edited the robofile and added the <laser_on_off_map> xml tag with an appropriate variable, I was able to control the laser with the fine control that one would expect instead of just using the "Test" button.  This was with roborealm version 2.4.0 which I recently upgraded to from 2.2.5.  There does appear to an issue with the gui interface for the SRV1b module when it comes to mapping variables to the laser which can be a problem for newbies such as I who rely on the gui interface (although that will be changing shortly once I graduate to the socket based api).

Andrew
Anonymous 8 years
Andrew,

You are correct! Seems that there was a small problem with setting that particular variable. Unless you actually pressed OK and then saved the robofile the variable was not being recorded correctly. This has been fixed in v2.4.2 and now functions as it should.

Thanks all for the tips!
STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index