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