Honda on Wednesday showcased a new motorcycle that can stand unaided with or without a rider, using technology the firm learned from developing a walking humanoid.

Unveiled at the Tokyo Motor Show, Honda's Riding Assist-e is an all-electric concept motorbike that constantly assesses its position and moves the steering bar to ensure the heavy machine stays upright.

For years, international bike manufacturers have experimented with various forms of gyroscopes to stop motorcycles falling over, said Hiroyuki Nakata, the engineer behind the idea.

"But if you wanted to keep something as heavy as a motorcycle standing, you need a large and heavy gyroscopic device and you need to keep turning it," he told AFP.

Honda's device, however, is only the size of a lamp and can be rigged above the front wheel.

With the system turned off, the motorcycle topples over when the rider takes his hands from it.

But when it is flipped on, the bike stays stock still as if in a magic show, even when the rider walks away from it.

"Our vision is to put this on large motorcycles as well as small ones used for the daily commute," Nakata said.

The technology was derived from Honda's ASIMO robot, a two-legged, self-standing humanoid that can jog, dance and converse with people.

Japan is proud of the robot and has shown it off to world leaders, including Canadian leader Justin Trudeau and then-President Barack Obama.