Skip to content

Commit

Permalink
feat(continental): add radar json schema
Browse files Browse the repository at this point in the history
Signed-off-by: amadeuszsz <[email protected]>
  • Loading branch information
amadeuszsz committed May 23, 2024
1 parent 5bd91f5 commit 2004c58
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/**:
ros__parameters:
sensor_model: "ARS548"
frame_id: "continental"
base_frame: "base_link"
object_frame: "base_link"
sensor_ip: "10.13.1.114"
host_ip: "10.13.1.166"
sensor_ip: "10.13.1.114"
data_port: 2368
frame_id: continental
base_frame: base_link
object_frame: base_link
launch_hw: true
multicast_ip: "224.0.2.2"
data_port: 42102
sensor_model: ARS548
configuration_host_port: 42401
configuration_sensor_port: 42101
use_sensor_time: false
Expand Down
46 changes: 5 additions & 41 deletions nebula_ros/launch/continental_launch_all_hw.xml
Original file line number Diff line number Diff line change
@@ -1,56 +1,20 @@
<?xml version="1.0"?>
<launch>
<arg name="launch_hw" default="true"/>
<arg name="sensor_model" default="ARS548"/>
<arg name="frame_id" default="continental"/>
<arg name="base_frame" default="base_link"/>
<arg name="object_frame" default="base_link"/>
<arg name="config_file" default="$(find-pkg-share nebula_ros)/config/radar/continental/$(var sensor_model).param.yaml"/>

<arg name="odometry_topic" default="odometry_input"/>
<arg name="acceleration_topic" default="acceleration_input"/>
<arg name="steering_angle_topic" default="steering_angle_input"/>
<arg name="acceleration_topic" default="acceleration_input"/>
<arg name="steering_angle_topic" default="steering_angle_input"/>

<!-- Ethernet based sensor: ARS548 -->
<arg name="sensor_ip" default="10.13.1.114" description="Radar Sensor IP"/>
<arg name="host_ip" default="10.13.1.166" description="Broadcast IP from Sensor"/>
<arg name="multicast_ip" default="224.0.2.2" description="Multicast Sensor IP"/>
<arg name="data_port" default="42102" description="Radar Data Port"/>
<arg name="configuration_host_port" default="42401" description="Radar host configuration port"/>
<arg name="configuration_sensor_port" default="42101" description="Radar sensor configuration port"/>
<arg name="use_sensor_time" default="false" description="Whether to use or not the timestamp from the sensor"/>

<arg name="configuration_vehicle_length" default="4.89" description="New vehicle length"/>
<arg name="configuration_vehicle_width" default="1.896" description="New vehicle width"/>
<arg name="configuration_vehicle_height" default="2.5" description="New vehicle height"/>
<arg name="configuration_vehicle_wheelbase" default="2.79" description="New vehicle wheel base"/>

<group if="$(eval &quot;'$(var sensor_model)' == 'ARS548' &quot;)" >
<group if="$(eval &quot;'$(var sensor_model)' == 'ARS548' &quot;)">

<node pkg="nebula_ros" exec="continental_ars548_ros_wrapper_node" name="nebula_continental_ars548" output="screen">

<param from="$(var config_file)" allow_substs="true"/>
<remap from="/diagnostics" to="diagnostics"/>
<remap from="odometry_input" to="$(var odometry_topic)"/>
<remap from="acceleration_input" to="$(var acceleration_topic)"/>
<remap from="steering_angle_input" to="$(var steering_angle_topic)"/>

<param name="launch_hw" value="$(var launch_hw)"/>
<param name="sensor_model" value="$(var sensor_model)"/>
<param name="frame_id" value="$(var frame_id)"/>
<param name="base_frame" value="$(var base_frame)"/>
<param name="object_frame" value="$(var object_frame)"/>
<param name="host_ip" value="$(var host_ip)"/>
<param name="multicast_ip" value="$(var multicast_ip)"/>
<param name="data_port" value="$(var data_port)"/>
<param name="sensor_ip" value="$(var sensor_ip)"/>
<param name="configuration_host_port" value="$(var configuration_host_port)"/>
<param name="configuration_sensor_port" value="$(var configuration_sensor_port)"/>
<param name="use_sensor_time" value="$(var use_sensor_time)"/>
<param name="configuration_vehicle_length" value="$(var configuration_vehicle_length)"/>
<param name="configuration_vehicle_width" value="$(var configuration_vehicle_width)"/>
<param name="configuration_vehicle_height" value="$(var configuration_vehicle_height)"/>
<param name="configuration_vehicle_wheelbase" value="$(var configuration_vehicle_wheelbase)"/>

<param name="use_sim_time" value="false"/>
</node>
</group>

Expand Down
37 changes: 37 additions & 0 deletions nebula_ros/schema/ARS548.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Radar Continental ARS548 parameters.",
"type": "object",
"definitions": {
"ARS548": {
"type": "object",
"properties": {
},
"allOf": [
{
"$ref": "sub/continental.json#/definitions/continental"
}
],
"required": [
]
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/ARS548"
}
},
"required": [
"ros__parameters"
],
"additionalProperties": false
}
},
"required": [
"/**"
],
"additionalProperties": false
}
91 changes: 91 additions & 0 deletions nebula_ros/schema/sub/continental.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Radar Continental common parameters.",
"type": "object",
"definitions": {
"continental": {
"type": "object",
"properties": {
"multicast_ip": {
"type": "string",
"default": "224.0.0.2",
"pattern": "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$",
"readOnly": true,
"description": "Multicast IPv4 address."
},
"sensor_model": {
"type": "string",
"readOnly": true,
"enum": [
"ARS548"
],
"description": "Radar Continental model."
},
"configuration_host_port": {
"type": "integer",
"default": 42401,
"minimum": 0,
"readOnly": true,
"description": "Host configuration port."
},
"configuration_sensor_port": {
"type": "integer",
"default": 42101,
"minimum": 0,
"readOnly": true,
"description": "Sensor configuration port."
},
"use_sensor_time": {
"type": "boolean",
"default": false,
"readOnly": true,
"description": "Use sensor time."
},
"configuration_vehicle_length": {
"type": "number",
"default": 4.9,
"minimum": 0.0,
"readOnly": true,
"description": "New vehicle length."
},
"configuration_vehicle_width": {
"type": "number",
"default": 1.9,
"minimum": 0.0,
"readOnly": true,
"description": "New vehicle width."
},
"configuration_vehicle_height": {
"type": "number",
"default": 2.5,
"minimum": 0.0,
"readOnly": true,
"description": "New vehicle height."
},
"configuration_vehicle_wheelbase": {
"type": "number",
"default": 2.8,
"minimum": 0.0,
"readOnly": true,
"description": "New vehicle wheelbase"
}
},
"allOf": [
{
"$ref": "radar.json#/definitions/radar"
}
],
"required": [
"multicast_ip",
"sensor_model",
"configuration_host_port",
"configuration_sensor_port",
"use_sensor_time",
"configuration_vehicle_length",
"configuration_vehicle_width",
"configuration_vehicle_height",
"configuration_vehicle_wheelbase"
]
}
}
}
37 changes: 37 additions & 0 deletions nebula_ros/schema/sub/radar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Radar common parameters.",
"type": "object",
"definitions": {
"radar": {
"type": "object",
"properties": {
"base_frame": {
"type": "string",
"default": "base_link",
"description": "Frame with true sensor pose. The final sensor data is transformed by base_frame -> frame_id."
},
"object_frame": {
"type": "string",
"default": "base_link",
"description": "Tracked objects frame."
},
"launch_hw": {
"type": "boolean",
"readOnly": true,
"description": "Launch hardware."
}
},
"allOf": [
{
"$ref": "nebula.json#/definitions/nebula"
}
],
"required": [
"base_frame",
"object_frame",
"launch_hw"
]
}
}
}

0 comments on commit 2004c58

Please sign in to comment.