astuff/astuff_sensor_msgs

A question to use 2 delphi-srr transmitting data to a can bus

giho-sung opened this issue · 1 comments

I have appreciated your works.
I have a question about using 2 delphi srr at once.

Situation

I ran 2 delphi_srr nodes to use 2 radars.
I set a first delphi_srr node as left and a second delphi_srr node as right.
But, I am not sure that an actual left radar got parameters for the left radar such as sensor_frame_id = left_srr and srr_side = Left. A right radar too.
The only way for me to check it was to see markers published from /as_tx/radar_markers.
I want to know how to explicitly match a delphi_srr node for the left radar with the actual left radar.
Or if there is an internal automatic mechanism to determine which node is left or right, please let me know the mechanism.
Our team car might make accidents if we couldn't sure the source of data, from a left radar or a right radar.

Here are the hardware configuration and software I used.

Hardware

 2 Delphi srr are installed on the left and right side of a car.
 There are 2 can bus for radars.
 A XCAN has provided vehicle status to two radars.
 A PCAN has being carried detection data from the radars to a PC.

Software

 I have used ros-kinetic on ubuntu 16.04
 Modified delphi_srr.launch file have been used to run 2 delphi_srr nodes.
Here is the delphi_srr.launch.

<!-- delphi_srr.launch -->
<?xml version="1.0"?>
<launch>
  <arg name="left_srr_frame_id" default="left_srr"/>
  <arg name="right_srr_frame_id" default="right_srr"/>

  <arg name="srr_upside_down" default="false" />
  <arg name="left_srr_side" default="Left" /> <!-- Options are "Left" or "Right" -->
  <arg name="right_srr_side" default="Right" /> <!-- Options are "Left" or "Right" -->
  <arg name="filter_on_valid" default="false" />

  <arg name="use_kvaser" default="true" /> <!-- check if use_kvaser is true or not-->>
  <arg name="kvaser_circuit_id" default="0" />
  <arg name="pcan_kvaser_hardware_id" default="44186" />
  <arg name="pcan_bit_rate" default="500000" />
  <arg name="vcan_kvaser_hardware_id" default="44188" />
  <arg name="vcan_bit_rate" default="125000" />

  <arg name="use_socketcan" default="false" />
  <!--arg name="socketcan_device" default="can0" /-->

  <node pkg="kvaser_interface" type="kvaser_can_bridge" name="kvaser_can_bridge_pcan" output="screen" if="$(arg use_kvaser)">
    <param name="can_hardware_id" value="$(arg pcan_kvaser_hardware_id)" />
    <param name="can_circuit_id" value="$(arg kvaser_circuit_id)" />
    <param name="can_bit_rate" value="$(arg pcan_bit_rate)" />
    <remap from="/can_rx" to="/srr_can_rx"/>
    <remap from="/can_tx" to="/srr_can_tx"/>
  </node>

  <node pkg="kvaser_interface" type="kvaser_can_bridge" name="kvaser_can_bridge_vcan" output="screen" if="$(arg use_kvaser)">
    <param name="can_hardware_id" value="$(arg vcan_kvaser_hardware_id)" />
    <param name="can_circuit_id" value="$(arg kvaser_circuit_id)" />
    <param name="can_bit_rate" value="$(arg vcan_bit_rate)" />
    <!--remap from="/can_rx" to="/srr_can_rx"/-->
    <!--remap from="/can_tx" to="/srr_can_tx"/-->
  </node>

  <!--node pkg="socketcan_bridge" type="socketcan_bridge_node" name="socketcan_bridge" if="$(arg use_socketcan)">
    <param name="can_device" value="$(arg socketcan_device)" />
  </node-->

  <node pkg="delphi_srr" type="delphi_srr" name="delphi_srr_left">
    <param name="sensor_frame_id" value="$(arg left_srr_frame_id)"/>
    <param name="srr_side" value="$(arg left_srr_side)"/>
    <param name="sensor_upside_down" value="true"/>
    <param name="filter_on_valid" value="$(arg filter_on_valid)" />
    <remap from="/can_rx" to="/srr_can_rx"/>
    <remap from="/can_tx" to="/srr_can_tx"/>
    <remap from="/as_tx/detections" to="as_tx/left_detections"/>
    <remap from="/as_tx/radar_markers" to="/as_tx/left_radar_markers"/>
  </node>

  <node pkg="delphi_srr" type="delphi_srr" name="delphi_srr_right">
    <param name="sensor_frame_id" value="$(arg right_srr_frame_id)"/>
    <param name="srr_side" value="$(arg right_srr_side)"/>
    <param name="sensor_upside_down" value="$(arg srr_upside_down)"/>
    <param name="filter_on_valid" value="$(arg filter_on_valid)" />
    <remap from="/can_rx" to="/srr_can_rx"/>
    <remap from="/can_tx" to="/srr_can_tx"/>
    <remap from="/as_tx/detections" to="as_tx/right_detections"/>
    <remap from="/as_tx/radar_markers" to="/as_tx/right_radar_markers"/>
  </node>
</launch>

Hi @giho-sung, assuming you are an AutonomouStuff customer, please reach out to our support team if you are still experiencing these issues: https://autonomoustuff.com/support