Wednesday, January 27, 2021

FRC Robotics 2021 Simulator with PathWeaver

This started with a post from Joe Ross on ChiefDelphi.com.

I needed some further details to get this to work.

Out of Date?: To add the proper map to PathWeaver, open a File Explorer to %USERPROFILE%/PathWeaver/Games, make a folder named "Custom Game" and copy 2021-Slalom.png and .json from the PathWeaver git repo then make a zip of the two files with the name 2021-Slalom.zip.

When you create the PathWeaver, use the Slalom map, some reasonable numbers for Max velocity is 2 m/s and 1 m/s2. 

Under paths, click the + button then click the Unnamed.path that is created.

Click the starting triangle and change the Y to -8.2 to get it to the bottom of the screen.  My son pointed out that you can click the blue line to adjust the Tangents.

Click the ending triangle and move it to the end point.

If you single click the line you can create a new triangle.  You can then click and drag the triangle to a new position on the map.

Click Build Paths when done and yes.  Somehow (clicking on the path when it was first created?) I got it to rename the project but it didn't work this time.

The {path}.wpilib.json file you need ends up in PathWeaver/output.  I had to copy it to src/main/deploy.

After replacing the voltage constraint, etc. code with the PathWeaver code, you have to change exampleTrajectory to just trajectory after the inserted code.  There is also a few times that you highlight the error and do Ctrl+. to resolve the problems.  Copying the json file to deploy means you can get rid of the paths/ part of the file name.  There are better ways to do this where the json file is generated.

When you start the simulation with F5, remember that you will see the robot moving under NetworkTables, SmartDashboard, Field.  You can add the map to the simulation by right clicking the top of the /SmartDashboard/Field window and navigating to the png file mentioned above. You have to change the Robot State to Autonomous.  It is nice that you don't need a controller.

I found that the path generated by PathWeaver did not scale well to the robot simulation.


Monday, December 21, 2020

Water Heater Maintenance

Now that I have been through 2 water heaters in 2 years, I am ready to learn how to maintain them.

I knew you were supposed to drain them every once in a while, but it is easy to assume they are working and hope for the best.  If you do this, make sure you put a pan under the water heater to catch the dripping water when it does give out.  I had rust tracks on the top of the old one.

The warranty is for 6 years.  Ours lasted 12 years without doing any of these things.  Delaying maintenance is a calculated risk.

This is from an Rheem Water Heater manual:

Replace the anode when 6" of the center wire is exposed.  You should probably check it 6 months after getting the water heater and every year after that.

The anode rod is about 2.5" down through insulation on the top of the unit.  There is a plastic cap on the top.

It takes a 1 1/6" socket to remove the anode rod.  The plumber had to hit the top of the existing rod to loosen it.  He said next time it will be easier.  He put plumbers lubricant as well as teflon tape on the new rode before inserting it.

After 2 years, pretty much all of the rod was exposed.



Drain several quarts every month.

Check the pressure valve once a year (make sure it is drained to a proper place).

If you are thinking of a tankless water heater, consider the cost of wiring for it.  The old water heaters used 10 gauge (10/2 on the wire) and the tankless needs 8 or 6 which is thicker.  Larger tankless needs 2 sets of wires ( or maybe 2 hots and 1 neutral).



Monday, November 18, 2019

New beetle convertible switch to manual top operation

My daughter pulled out in front of  the someone and they hit the left behind the wheel.  Various manuals point out that this is where the hydraulic pump for the convertible top is.  You have to remove the trunk liner to see the pump (which I haven't done yet).

  • Follow the manual to disable the button (remove a rubber stop in the left of the trunk and twist the valve to disengage the hydraulics)
  • The alarm will go off for 5 seconds each time you pull away from a stop if the top is down.
  • To disable the convertible system altogether and stop the alarm about the top not being secured down, you need to remove the fuse for the convertible system.
  • I had to remove the driver knee bolster (the cover and the reinforcement) to see the fuse on the top of the relay panel.  This will disable the big button that rolls all the windows down.
It was a lot of work so hopefully this picture will save you the effort.  The fuse is the top green fuse on the right.  Below is a link to where I first got the information from newbeetle.org and a picture of the standard relay layout which does not include the position D or the fact that the convertible fuse is above that position.

I hope this saves someone the pain I went through of pulling the dash apart to remove the fuse.  It isn't a lot of effort to put the top up and down manually if you don't want to pay a mechanic thousands of dollars to fix the problem.


https://www.newbeetle.org/threads/fuse-position-30-for-the-convertible-top.110481/


Tuesday, January 22, 2019

Updating Exif Data on JPEG Pictures

I have all these pictures and more are coming.  I am concerned about 20 or 40 years from now when we look at them and say "who was that?".

I feel the solution is to update the Exif data which is embedded in the picture.  I have been trying to find a way to update the Exif data.  Windows 10 and  and Mac OS have the ability built in.  I am still working on a way to update it in Android and IOS using a web page.

To update it on Windows 10, right click the picture, select properties.  Click on the Details tab.  The first section is editable.  Most of the other parts are not.  Below you will see that the Apple Title and Description are correlated to the Windows Title and Description.

On MacOS, I found you can modify the Exif data by opening the picture in the Photos app and running Command-I that will show the following screen which will allow you to update the Title and Description by clicking on the line you want to change.

You can also use TheXifer to change these and many more Exif fields.  It is free for a limited amount of photos per day.  You can link it to your Dropbox, Flikr and Google Drive accounts but I am concerned about security risks.  You have to assume that they keep any photo you upload but I doubt they spend much time figuring out how to exploit the photos on an individual basis.

I am working on a small VM to update a limited number of fields by a web page that uploads the file, changes the fields and then downloads the file again.  Using PHP does not seem to be an easy way to make the change.  This is a portable, watered down version of TheXifer.

Dry(er) information:
The Exif data is written in accordance with an Adobe standard called XMP.  It was later adopted in ISO 16684-1:2012 which has been updated.

If you add a title or description and then edit the JPG with an editor such as Notepad++, you can see the data in several places under XML tags and in binary portions of the file.


Friday, October 26, 2018

Fix our windows

The rails on my window come off. To get them to come off intentionally put the clips on the side top out and push up. Sometimes the rail comes off and goes into the top. You have to pry the block at the top out and pull down on it until it gets in the position.




  • The top of the window (sash cam) is replaceable by using and H 3943 from primeline.net.
  • The mechanism on the sides of the window with the spring and the cable are called a block and tackle balance.  Ours are CMC 5/8" Caldwell series 86BT with a 15P142 Winged top and 15P102 Winged bottom.  I was able to replace them using the website windowrepairparts.us.

Saturday, July 14, 2018

Pressure washing a pool

I have acid washed my pool a couple of times and the results were not good.  I saw streaks where the acid went and still got algae back.  This time a pool guy said we should pressure or power wash it.  The pool was bad.  The water was green, the sides were black and the bottom was slimy.  We couldn't keep the chlorine up.  The in floor jet system was getting junk caught in the screen.

The pool guy replaced our DE filters and fixed our backwash valve (which you are supposed to grease every time you backwash).  We then drained the pool using a sump pump since the normal pump couldn't keep a vacuum to get all the water out of the bottom.  We had to finish emptying the pool using the neighbor's shop vac.  Then my wife decided to use a bug sprayer filled with chlorine on a mist setting to spray the sides (don't breath it or get too much on your skin).  She then shot the sides with a 3000 PSI pressure washer with a 40 degree nozzle.  She said she had to repeat this 3 times but the pool looks great.

The pool is 20 years old and apparently plaster is only supposed to last 12 years so we lost more plaster and the pool surface is rough.  The roughness makes it easier for algae to form.



Tuesday, June 12, 2018

Adding hosts to Nagios Core 4.3.4 on Linux

Nagios wants you to buy Nagios XI which makes it easy to add hosts using the web page.  If you want to use the free Nagios Core and want to add a windows host, edit /usr/local/nagios/etc/objects/windows.cfg, copy the first "define host" section and add it below the first define host.  You then need to change the {IP} "address", the host_name and the "alias" to something new.  Save the file and restart Nagios (systemctl restart nagios?)

If you are adding a linux host, the cheap way is to edit /usr/local/nagios/etc/objects/localhost.cfg and repeat the above with the first defined host.

Adding a switch requires you to edit /usr/local/nagios/etc/nagios.cfg and uncomment the switch.cfg line.  Then edit /usr/local/nagios/etc/objects/switch.cfg.