You probably don’t want to avoid junctions you want to avoid turns, I think?
This is currently not possible on two layers:
- first you have to enable turn restriction support for foot (see e.g. car where this is possible)
- implement what is a left and right turn and avoid those. See my experiments here: Flexible / Configurable Weighting Update
Avoiding junctions is also not yet possible. Still experiments have shown that this might lead to other problems: Interpret traffic lights · Issue #75 · graphhopper/graphhopper · GitHub