Walmart is investing hundreds of millions of dollars this year to improve stores as it adjusts to changing shopping habits and ups its fight against Amazon.

A direct beneficiary of the move is Tennant Co., the Golden Valley-based maker of cleaning equipment and supplies that scored a contract to provide Walmart 1,500 of its autonomous floor-cleaning T7AMR machines.

Terms of the deal with Walmart were not disclosed. But the news helped push Tennant stock up 5 percent Wednesday.

The deal is an important step in boosting the Tennant product. Walmart last year tested robotic equipment, including the Tennant machine, throughout its stores.

Separately, Walmart said it will spend about $32 million to renovate five stores this year in Minnesota: Alexandria, Bemidji, Buffalo, Detroit Lakes and West St. Paul. Last year, 10 stores were renovated at a cost of $35 million.

Walmart’s makeovers include adding grocery pickup and delivery and kiosks for online orders, but they are not as extensive or expensive as the top-to-bottom redos at Target. That retailer spent $250 million renovating 27 stores last year in Minnesota and has pledged to spend another $50 million in the state this year.

Walmart laid out a national plan to add 1,500 autonomous floor cleaners; 300 autonomous shelf scanners that do store shelf inventory work; 1,200 unloaders that scan and sort items unloaded from trucks; and 900 pickup towers, or kiosks, where customers can pick up online orders.

The technology upgrades are part of an $11 billion plan to improve the company’s store and e-commerce operations, Walmart spokeswoman Tiffany Wilson said.

Nearly 25 Walmart stores in Minnesota this year will get the new Tennant floor cleaners, 20 will get the unloaders and eight more will get the pickup towers. In addition, 25 more stores will get online grocery pickup service and a dozen grocery delivery services.

“In Minnesota, we recognize that our customers desire a personalized shopping experience to fit their needs, so it’s vital that we invest in our stores and technology in order to best serve them,” Matt Armiger, Walmart’s regional general manager, said.

As with other national retailers, Walmart stores have increasingly become fulfillment centers for online orders. Those tasks, plus online grocery orders, have demanded more staff in those areas. Wage pressure also has contributed to stores looking for ways to automate tasks that are the least liked by workers.

In turn, employee retention has improved, said Wilson, the Walmart spokeswoman.

“This technology we’re using in stores is meant to empower associates,” she said. Additional benefits and training for more skilled jobs in stores — plus new categories such as personal shoppers — have resulted in year-over-year turnover being “reduced significantly.”

That’s the idea with the Tennant floor cleaners.

“Rather than riding on a floor-cleaning machine for several hours, the associate is now working with robotics to complete their duties,” John Crecelius, the retailer’s senior vice president of central operations, said in a statement.

Some of the 1,500 floor-cleaning machines are already in stores, including one in Hastings, and the rest will be rolled out through the rest of this year, according to Walmart spokesman Ragan Dickens.

“We are proud to partner with Walmart, the first major global retailer to introduce autonomous cleaning robots to deliver operational efficiency, cleaning performance and customer value on a broad scale across a retail platform,” Chris Killingstad, Tennant’s president and chief executive, said in a statement.

With the T7AMR, an operator inputs a cleaning route and then can monitor the machine while doing other tasks. Cameras, lasers and sensors mounted on the machine feed inputs into the self-driving operating system developed by Tennant’s partner, San Diego-based Brain Corp.

The system allows the machine to follow the prescribed route but also to avoid obstacles. It can also send alerts and reports to the operator’s smartphone so he or she can tell when a route is complete or service is required.