Skip to content

Acceleration control

Niklas Burggraaff s1902977 requested to merge acceleration_control into master

Added acceleration controls to the simulation.

The main change is in the ros_can_sim node. I made controlMethod a parameter to determine whether to use the acceleration from the command message instead of the speed in order to publish to topics provided by gazebo to move the car.

However, to make this work I had to update the robot model of the car. I deleted ads-dv-torque.urdf.xacro because the old code seemed outdated. All that needed to be changed of the car was the controller of the axle of the wheels. To switch between this I added the control method argument to the loading of the car, which in suspension_wheel.urdf.xacro changes the controller from a VelocityJointController to an EffortJointController (which to be exact uses effort instead of acceleration).

Alongside this I also had to load a different yaml file with information on the controller for when the simulation is launched using acceleration. To do this I created eufs_control_acceleration.yaml with the exact same data as the old eufs_control.yaml except for replacing the controllers of the axle of the wheels to be EffortJointControllers instead of VelocityJointControllers. I renamed the old eufs_control.yaml to eufs_control_speed.yaml for consistency and making it easier to load from the eufs_control launch file with the controlMethod argument that is now passed to it.

I also updated the eufs launcher GUI to say acceleration instead of torque as the control method.

Deleted not used nodes in ros_can_sim package. Updated twist_to_ackermannDrive.py to also publish acceleration in the message that is published by the node, to make the robot control gui work with the acceleration control method.

I renamed some topics because of this new control method: Renamed /cmd_vel_out to /cmd_out because it is not necessarily velocity, but could also be acceleration, so this is more consistent with what is published to the topic. Renamed /cmd_vel to /cmd (which is the topic published to by the rqt gui when driving in manual mode) for the same reason.

Because of this I also made changes to other sub-repositories, which will also have a merge request, which should be merged simultaneously. https://gitlab.com/eufs/control/-/merge_requests/28 https://gitlab.com/eufs/eufs_car/-/merge_requests/35 https://gitlab.com/eufs/ros_can/-/merge_requests/11 https://gitlab.com/eufs/wheelchair/-/merge_requests/8

(I also created a world file for the empty world because it did not seem to launch correctly without it.)

Edited by Niklas Burggraaff s1902977

Merge request reports