-
Notifications
You must be signed in to change notification settings - Fork 91
Description
Hello Dear Friends. Today, together with SPA technologies (react, vue, angular, etc..), we develop applications with ROS
By default, after downloading "ros2djs" with npm or a similar package manager, you will most likely get a "createjs" error. (This problem is present in all SPA applications)
If you are importing ros2djs mandatory packages in an html page with cdn link. It will work flawlessly. However, if you want to make a web application with a SPA technology, you will need to make a solution in this way.
PROBLEM SOLUTION STEPS
First, you download the required packages.
package managers may vary npm, yarn, nuget etc.. not problem.
npm install roslib
npm install ros2djs
The "createjs" module should be included after all downloads are complete. "createjs" is required for graphics and map operations
BUT
When downloading, "createjs-module" package should be downloaded, not "createjs".
After the download of the packages is complete, we have one last step to fix the import error.
Go to ros2djs/src/Ros2D.js file and top line add
import * as createjs from "createjs-module
and
Go to ros2djs/build/ros2d.js file and top line add
import * as createjs from "createjs-module
After performing these operations, you can now start using the ROS2D library.
FINALLY
After doing these operations to the class you will import ros2d You need to add as follows.
import * as ROS2D from "ros2d
BONUS
If you don't want to deal with all these processes, I did it for you. You can start using it after downloading it directly from my repo address.
my repo : https://github.com/smhylc/ros2djs
npm -i https://github.com/smhylc/ros2djs
After downloading with the command, you can use the package without any problems.
Thank you.
- Library Version:All Version
- ROS Version: All ROS Version
- Platform / OS: All OS