latest pushes
This commit is contained in:
parent
bb87e61cb7
commit
c06fb4b927
@ -8,7 +8,7 @@ def ros1_launch_description():
|
|||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
|
|
||||||
# Construct the ROS 1 launch command
|
# Construct the ROS 1 launch command
|
||||||
roslaunch_command = ["roslaunch", "ros_web_api_bellande_step", "bellande_step_api_2d.py"] + args
|
roslaunch_command = ["roslaunch", "ros_web_api_bellande_step", "bellande_step_api_2d.launch"] + args
|
||||||
|
|
||||||
# Execute the launch command
|
# Execute the launch command
|
||||||
subprocess.call(roslaunch_command)
|
subprocess.call(roslaunch_command)
|
||||||
|
@ -18,11 +18,11 @@ def main():
|
|||||||
endpoint_path = config['endpoint_path']["2d"]
|
endpoint_path = config['endpoint_path']["2d"]
|
||||||
|
|
||||||
# Get the parameters from the ROS parameter server
|
# Get the parameters from the ROS parameter server
|
||||||
x1 = rospy.get_param('x1')
|
x1 = rospy.get_param('x1', 0)
|
||||||
y1 = rospy.get_param('y1')
|
y1 = rospy.get_param('y1', 0)
|
||||||
x2 = rospy.get_param('x2')
|
x2 = rospy.get_param('x2', 0)
|
||||||
y2 = rospy.get_param('y2')
|
y2 = rospy.get_param('y2', 0)
|
||||||
limit = rospy.get_param('limit')
|
limit = rospy.get_param('limit', 3)
|
||||||
|
|
||||||
# JSON payload
|
# JSON payload
|
||||||
payload = {
|
payload = {
|
||||||
@ -47,6 +47,7 @@ def main():
|
|||||||
response.raise_for_status() # Raise an error for unsuccessful responses
|
response.raise_for_status() # Raise an error for unsuccessful responses
|
||||||
data = response.json()
|
data = response.json()
|
||||||
print("Next Step:", data['next_step'])
|
print("Next Step:", data['next_step'])
|
||||||
|
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
print("Error:", e)
|
print("Error:", e)
|
||||||
|
|
||||||
@ -55,6 +56,6 @@ if __name__ == '__main__':
|
|||||||
if ros_version == "1":
|
if ros_version == "1":
|
||||||
import rospy
|
import rospy
|
||||||
elif ros_version == "2":
|
elif ros_version == "2":
|
||||||
rclpy
|
import rclpy
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user