Skip to content

Commit

Permalink
Merge branch 'hires_mode_support' of github.com:mojomex/nebula into h…
Browse files Browse the repository at this point in the history
…ires_mode_support
  • Loading branch information
mojomex committed Jul 4, 2024
2 parents 0247d39 + 3780caf commit 8dff4d9
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build_depends.repos
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ repositories:
ros2_socketcan:
type: git
url: https://github.com/knzo25/ros2_socketcan
version: feat/continental_fd
version: feat/continental_fd
3 changes: 1 addition & 2 deletions nebula_common/include/nebula_common/hesai/hesai_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ inline std::ostream & operator<<(std::ostream & os, HesaiSensorConfiguration con
<< ", FOV(Start):" << arg.cloud_min_angle << ", FOV(End):" << arg.cloud_max_angle
<< ", DualReturnDistanceThreshold:" << arg.dual_return_distance_threshold
<< ", PtpProfile:" << arg.ptp_profile << ", PtpDomain:" << std::to_string(arg.ptp_domain)
<< ", PtpTransportType:" << arg.ptp_transport_type
<< ", PtpSwitchType:" << arg.ptp_switch_type
<< ", PtpTransportType:" << arg.ptp_transport_type << ", PtpSwitchType:" << arg.ptp_switch_type
<< ", HighResolutionMode:" << arg.hires_mode;
return os;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,8 @@ HesaiLidarRangeAll HesaiHwInterface::GetLidarRange()
return hesai_range_all;
}

Status HesaiHwInterface::SetHighResolutionMode(bool enable) {
Status HesaiHwInterface::SetHighResolutionMode(bool enable)
{
std::vector<unsigned char> request_payload;
request_payload.emplace_back(enable ? 0x01 : 0x00);

Expand All @@ -512,7 +513,8 @@ Status HesaiHwInterface::SetHighResolutionMode(bool enable) {
return Status::OK;
}

bool HesaiHwInterface::GetHighResolutionMode() {
bool HesaiHwInterface::GetHighResolutionMode()
{
auto response_or_err = SendReceive(PTC_COMMAND_GET_HIGH_RESOLUTION_MODE);
auto response = response_or_err.value_or_throw(PrettyPrintPTCError(response_or_err.error_or({})));

Expand Down Expand Up @@ -950,7 +952,6 @@ HesaiStatus HesaiHwInterface::CheckAndSetConfig(
auto hires_currently_enabled = GetHighResolutionMode();

if (hires_currently_enabled != sensor_configuration->hires_mode) {

PrintInfo("current lidar hires_mode: " + std::to_string(hires_currently_enabled));
PrintInfo(
"current configuration hires_mode: " + std::to_string(sensor_configuration->hires_mode));
Expand Down
2 changes: 1 addition & 1 deletion nebula_ros/launch/continental_launch_all_hw.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<remap from="steering_angle_input" to="$(var steering_angle_topic)"/>
</node>
</group>

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

<node pkg="nebula_ros" exec="continental_srr520_ros_wrapper_node" name="nebula_continental_srr520" output="screen">
Expand Down
8 changes: 6 additions & 2 deletions nebula_ros/schema/SRR520.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@
"$ref": "#/definitions/SRR520"
}
},
"required": ["ros__parameters"],
"required": [
"ros__parameters"
],
"additionalProperties": false
}
},
"required": ["/**"],
"required": [
"/**"
],
"additionalProperties": false
}
16 changes: 13 additions & 3 deletions nebula_ros/schema/sub/communication.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@
"ptp_profile": {
"type": "string",
"default": "1588v2",
"enum": ["1588v2", "802.1as", "automotive"],
"enum": [
"1588v2",
"802.1as",
"automotive"
],
"description": "PTP profile."
},
"ptp_domain": {
Expand All @@ -85,13 +89,19 @@
"ptp_transport_type": {
"type": "string",
"default": "UDP",
"enum": ["UDP", "L2"],
"enum": [
"UDP",
"L2"
],
"description": "1588v2 supports 'UDP' or 'L2', other profiles only L2 (HW)."
},
"ptp_switch_type": {
"type": "string",
"default": "TSN",
"enum": ["TSN", "NON_TSN"],
"enum": [
"TSN",
"NON_TSN"
],
"description": "For automotive profile,'TSN' or 'NON_TSN'."
},
"receiver_timeout_sec": {
Expand Down

0 comments on commit 8dff4d9

Please sign in to comment.