Robots can help people find their way around in complex buildings and environments. Robots are embodied, which makes it more intuitive for users to follow them around compared to, e.g., colored lines on the floor. However, they need to be socially intelligent for people to accept them. Like people, robots should keep a comfortable distance to its users when working.We investigate the optimization of a guiding robot's speed and distance when guiding to improve the user experience. Our findings indicate a correlation between the user's speed and the distance they keep from the robot, which can be utilized to control the robot's speed.A person tracking system is implemented on a Spot quadruped mobile robot platform from Boston Dynamics, using the on-board depth and 2D cameras plus an Intel NUC and a Jetson Nano for processing. The system uses the Mobilenet-SSDv2 CNN for user detection and Kalman filtering for tracking.Data from human-robot interaction tests on footpaths at Aalborg University is analyzed to create a linear model of the speed-distance relationship. Based on this, a control law is proposed and tested, demonstrating the ability to build a controller that allows the person following the robot to set the desired velocity of the robot.