Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not get the ego car reversed through lgsvl_msgs/msg/VehicleControlData #1303

Closed
ZhenshengLee opened this issue Mar 24, 2021 · 12 comments
Closed
Assignees
Labels
2021.1 answered Waiting for response enhancement New feature or request

Comments

@ZhenshengLee
Copy link

Hi,

I am tring to get the latest autoware.auto 1.0.0 avp demo work in my ubuntu1804 environment, and I found the issue when testing the simulator

ros2 topic pub --once /lgsvl/vehicle_control_cmd lgsvl_msgs/msg/VehicleControlData "{
> header:
>   {stamp:
>     {sec: 1600775035,
>     nanosec: 496432027},
>   frame_id: map},
> acceleration_pct: 1.0,
> braking_pct: 0.0,
> target_gear: 2
> }
> "
publisher: beginning loop
publishing #1: lgsvl_msgs.msg.VehicleControlData(header=std_msgs.msg.Header(stamp=builtin_interfaces.msg.Time(sec=1600775035, nanosec=496432027), frame_id='map'), acceleration_pct=1.0, braking_pct=0.0, target_wheel_angle=0.0, target_wheel_angular_rate=0.0, target_gear=2)

the ego car cannnot get reversed, and it get forward, the same as target_gear: 0
So, what's the right msg to let the ego car get reversed?

thanks a lot!

@ZhenshengLee ZhenshengLee changed the title How to get the ego car reversed through lgsvl_msgs/msg/VehicleControlData Can not get the ego car reversed through lgsvl_msgs/msg/VehicleControlData Mar 24, 2021
@EricBoiseLGSVL
Copy link
Contributor

@ZhenshengLee Sorry this is not supported at this time. We only have reverse for apollo control. You will need to implement this. Right @hadiTab ? For 06 release you would need to change the ROS2 conversion data and then edit the controller to set the vehicle Reverse == true from message received. Look at Reverse code for CyberRT and ApolloControl in VehicleControlSensor.cs

if (data.CurrentGear == GearPosition.Reverse)
{
    Dynamics.ShiftReverseAutoGearBox();
}
else if (data.CurrentGear == GearPosition.Drive)
{
    Dynamics.ShiftFirstGear();
}

@EricBoiseLGSVL EricBoiseLGSVL added the answered Waiting for response label Mar 24, 2021
@EricBoiseLGSVL
Copy link
Contributor

I have heard from @lemketron that this is supported in our new release out very soon :)

@ZhenshengLee
Copy link
Author

@EricBoiseLGSVL thanks a lot
But I found nothing happend in 202101 release to get the ego car reversed

@ZhenshengLee
Copy link
Author

@EricBoiseLGSVL Can you briefly describle the feature implementation? Will the ego car be reversed control throught state_cmd or control_cmd?

@TrentWeiss
Copy link

Can confirm: using "target_gear: 2" (reverse) that is part of lgsvl_msgs/msg/VehicleControlData does not make the vehicle reverse, even in the new release.

@ZhenshengLee
Copy link
Author

Badluck, In 2021.01 turning control is not work too.

ros2 topic pub -r 10 /lgsvl/vehicle_control_cmd lgsvl_msgs/msg/VehicleControlData "{
header:
  {stamp:
    {sec: 1600775035,
    nanosec: 496432027},
  frame_id: map},
acceleration_pct: 0.0,
braking_pct: 0.0,
target_wheel_angle: 2.0,
target_wheel_angular_rate: 1,
target_gear: 0
}
"

@ZhenshengLee
Copy link
Author

Badluck, In 2021.01 turning control is not work too.

ros2 topic pub -r 10 /lgsvl/vehicle_control_cmd lgsvl_msgs/msg/VehicleControlData "{
header:
  {stamp:
    {sec: 1600775035,
    nanosec: 496432027},
  frame_id: map},
acceleration_pct: 0.0,
braking_pct: 0.0,
target_wheel_angle: 2.0,
target_wheel_angular_rate: 1,
target_gear: 0
}
"

due to autoware auto and lgsvl interface incompatibility,
you can comment the line in Assets/Scripts/Bridge/Ros2/Ros2Conversions.cs to solve this.
SteerInput = data.target_wheel_angular_rate,

@TrentWeiss
Copy link

Badluck, In 2021.01 turning control is not work too.

ros2 topic pub -r 10 /lgsvl/vehicle_control_cmd lgsvl_msgs/msg/VehicleControlData "{
header:
  {stamp:
    {sec: 1600775035,
    nanosec: 496432027},
  frame_id: map},
acceleration_pct: 0.0,
braking_pct: 0.0,
target_wheel_angle: 2.0,
target_wheel_angular_rate: 1,
target_gear: 0
}
"

You have set target_gear to 0, which is neutral. Hence the car not moving. You need to set target_gear to 1 (drive). Also, I am able to steer the car by only setting target_wheel angle and leaving target_wheel_angular_rate at 0.0.

@EricBoiseLGSVL
Copy link
Contributor

Sorry for the confusion. Reverse is not supported in the latest release. A team created their own control sensor that supports this. You can look at Apollo control sensor and apollo data conversion classes to see how to implement.

@EricBoiseLGSVL
Copy link
Contributor

adding @hadiTab so we can add fixes to next release

@marcusvinicius178
Copy link

Hi @EricBoiseLGSVL a short question, please. The issue of bridge connection Autoware.Auto -SVL new 2021 release discussed here https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto/-/issues/1264#

Was fixed just for 2021.1 release or the connection works for all other 2021 releases(2021.1.1, 2021.1.1, 2021.2.1, 2021.2.1, etc...)?????

I wish to know to use the correct SVL version for Autoware.Auto

Thanks ☺️

@EricBoiseLGSVL
Copy link
Contributor

Yes, we are working on this now to validate autoware.auto. We should have a solution soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2021.1 answered Waiting for response enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants