Could be an inchworm or a looper. You have to inspect the "prolegs" to determine which one it is. You could spray with bt ( Bacillus thuringiensis) to control them if you wish. Ian
Maybe just hand pick, or do nothing as they may be mature and stop feeding. Japanese barberry is a pest species in eastern North America, so if there is a caterpillar present that attacks it that is not bad news.