Skip to content

Commit 8057095

Browse files
committed
Fix xacro path
1 parent 1707563 commit 8057095

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/robot.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,15 @@ export class URDFLoadingManager extends LoadingManager {
4949
super();
5050
this._urdfLoader = new URDFLoader(this);
5151
this._xacroLoader = new XacroLoaderWithPath();
52+
this.setWorkingPath();
5253
}
5354

5455
/**
5556
* Sets the path where the loaders will search for robot description files
5657
*
5758
* @param workingPath - The path to the robot files
5859
*/
59-
setWorkingPath(workingPath: string): void {
60+
setWorkingPath(workingPath = ''): void {
6061
// To match '/this/format/path'
6162
workingPath = workingPath[0] !== '/' ? '/' + workingPath : workingPath;
6263
workingPath =
@@ -79,7 +80,8 @@ export class URDFLoadingManager extends LoadingManager {
7980
});
8081

8182
this._xacroLoader.workingPath =
82-
PageConfig.getBaseUrl() + '/files' + this._workingPath;
83+
PageConfig.getBaseUrl() + 'files' + this._workingPath;
84+
console.debug('[Xacro]: Modify URL with prefix', this._xacroLoader.workingPath);
8385
}
8486

8587
/**

0 commit comments

Comments
 (0)