testing
This commit is contained in:
parent
11a83e7343
commit
980f10232b
@ -1,9 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.8)
|
cmake_minimum_required(VERSION 3.8)
|
||||||
project(ros_web_api_bellande_step)
|
project(ros_web_api_bellande_step)
|
||||||
|
|
||||||
## Compile as C++11, supported in ROS Kinetic and newer
|
|
||||||
add_compile_options(-std=c++11)
|
|
||||||
|
|
||||||
# Find ROS
|
# Find ROS
|
||||||
if($ENV{ROS_VERSION} EQUAL 1)
|
if($ENV{ROS_VERSION} EQUAL 1)
|
||||||
find_package(catkin REQUIRED COMPONENTS
|
find_package(catkin REQUIRED COMPONENTS
|
||||||
|
Binary file not shown.
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Create and navigate to build directory
|
||||||
|
mkdir -p build && cd build
|
||||||
|
|
||||||
|
# Build package
|
||||||
|
if [ $ROS_VERSION -eq 1 ]; then
|
||||||
|
cmake -DROS_VERSION=1 ..
|
||||||
|
make -j$(nproc)
|
||||||
|
else
|
||||||
|
cmake -DROS_VERSION=2 ..
|
||||||
|
make -j$(nproc)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Source package setup file
|
||||||
|
source devel/setup.bash
|
||||||
|
|
||||||
|
# Run rosdep
|
||||||
|
rosdep install --from-paths ../src --ignore-src -y
|
||||||
|
|
||||||
|
# Return to package root directory
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Run ROS launch file
|
||||||
|
if [ $ROS_VERSION -eq 1 ]; then
|
||||||
|
roslaunch ros_web_api_bellande_step bellande_step_api_2d_launch.launch.py x1:=0 y1:=0 x2:=5 y2:=5 limit:=3
|
||||||
|
else
|
||||||
|
ros2 launch ros_web_api_bellande_step bellande_step_api_2d_launch.launch.py x1:=0 y1:=0 x2:=5 y2:=5 limit:=3
|
||||||
|
fi
|
@ -1,10 +1,11 @@
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
import sys
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# Read configuration from config.json
|
# Read configuration from config.json
|
||||||
with open('config.json', 'r') as config_file:
|
with open(os.path.join(sys.path[0], 'config.json'), 'r') as config_file:
|
||||||
config = json.load(config_file)
|
config = json.load(config_file)
|
||||||
url = config['url']
|
url = config['url']
|
||||||
endpoint_path = config['endpoint_path']
|
endpoint_path = config['endpoint_path']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user