sublimetext3 - Sublime Text 3: how to create a build system? -


i m ros user. framework define working directory:

$ mkdir -p ~/catkin_ws/src $ cd ~/catkin_ws/src // here create c++ packages 

and let system compile packages typing following:

$ cd ~/catkin_ws/ $ catkin_make 

but means should keep @ least 1 more console open, call command:

$ catkin_make  

which compiles @ once packages ve written in working directory.

since m using sublime text 3 write software want able call function sublime went through tutorial many times, still don't understand how can create building system.

i tried following:

{     "path": "~/workspace_ros",     "cmd": ["catkin_make"] } 

but following error message:

[errno 2] no such file or directory: 'catkin_make' [cmd: ['catkin_make']] [dir: /home/will/workspace_ros/src/flight_system/src/include] [path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games] [finished] 

i tried following options:

path shell_cmd 

but still doesn't recognize catkin command compiling

what's wrong?

ps: in workspace have cmakelists.txt file. calling catkin in shell compiles fine.

i not sure if best way accomplish it, did. keep in mind did winros project, regular ros projects, need tweak bit.

first, created build system project follows (so append project file):

"build_systems": [   {     "name" : "ros",     "cmd" : ["$project_path/build.bat"],     "working_dir" : "$project_path",      "variants" : [       {         "name" : "run",         "cmd" : ["$project_path/run.bat"]       }     ]   } ] 

i created build.bat , run.bat scripts referenced in there in project's root directory (in case ~/workspace_ros). created these scripts because there more building/running nodes calling catkin_make. need call setup scripts first.

here's build.bat

@echo off  rem basically, change cwd project's root dir set ws_path=%~dp0 cd /d "%ws_path%" call setup.bat winros_make -i 

you might want change bash script linux system, , tweak script itself. idea change cwd project's path , call setup file , build afterwards.

here's run.bat

@echo off  rem call setup script , launch node call "c:\opt\ros\hydro\x86\setup.bat" roslaunch eyetracker_talker talker.launch 

again, might need change bash script. in case, use roslaunch run node.

finally, gives 2 build options (build , build: run). output of both should shown in build output window.

hope helps.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -