From b70dc66fef706b53aa1b2d1a616a1220ad464371 Mon Sep 17 00:00:00 2001 From: McDonaldsHappyMeal <140054036+McDonaldsHappyMeal@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:44:55 +1100 Subject: [PATCH 1/3] Create getting_started.md --- doc/getting_started.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 doc/getting_started.md diff --git a/doc/getting_started.md b/doc/getting_started.md new file mode 100644 index 0000000..90bf455 --- /dev/null +++ b/doc/getting_started.md @@ -0,0 +1,25 @@ +# Getting started with PacSim + +To use PacSim, you need to create a message converter node to match your own interfaces with the simulator. You will need to advertise and publish to some topics. Note that some topics are not directly used in the simulator. + +| TOPIC | MESSAGE TYPE | DESCRIPTION | USED? | +|------------------------------|----------------------------|---------------------------------------------------------------------------------------|---| +| /pacsim/steering_setpoint | pacsim::msg::StampedScalar | Target steering angle at the steering wheel/sensor (rad) | YES | +| /pacsim/torques_max | pacsim::msg::Wheels | Upper bound torque value at each wheel's motor (Nm) | YES | +| /pacsim/powerground_setpoint | pacsim::msg::StampedScalar | Powered ground multiplier. 0 for no powered aero, 1 for full capacity (Dimensionless) | YES | +| /pacsim/torques_min | pacsim::msg::Wheels | Lower bound torque value at each wheel's motor (Nm) | NO | +| /pacsim/wheelspeed_setpoints | pacsim::msg::Wheels | Target wheel speeds at each wheel's motor (RPM) | NO | + +This simulator does not model the interface of a motor controller. It is highly recommended you implement your own internal control loop that controls the amount of torque applied to each wheel to reach a given target wheel speed. Moreover, `torques_max` can be seen more as the "current torque request sent", rather than the upper bound torque value at each wheel's motor. + +The example launch file (example.launch.py) shows an example of how to start the simulator node and the robot_state_publisher for the 3D visualisation of the car. + +The sensors and vehicle model are configured using config files. Examples are provided in the config folder. Things such as the discipline or the path of the track file or config files are defined using ROS2 parameters. + +Future improvements that you may like to consider include, but are not limited to: +- Implement a more accurate vehicle model in the future via the `IVehicleModel` class. +- Improve sensor modelling (e.g. realistic false positive and false negative cone detections) +- Generate ground truth reference trajectory from track YAML files +- External clock control (ability to pause/play at will for debugging purposes) + +### Do you have any ideas? Please feel free to contribute by creating an issue on the repository! From 60182ea14601917c56bf91e62a82ef70cfa032ce Mon Sep 17 00:00:00 2001 From: McDonaldsHappyMeal <140054036+McDonaldsHappyMeal@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:50:37 +1100 Subject: [PATCH 2/3] Update README.md --- README.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b7ec658..12e4d47 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,8 @@ Install dependencies: `sudo apt install ros-iron-desktop ros-iron-xacro` # How to get started -To use PacSim with your autonomous system, you need to create a message converter node to match your own interfaces with the simulator. -We provide an example launch file (example.launch.py) which shows an example of how to start the simulator node and the robot_state_publisher for the 3d visualization of the car. - -The sensors and vehicle model are configured using config files. Examples are provided in the config folder. Things such as the discipline or the path of the track file or config files are defined using ros2 parameters. - -The default vehicle model provided is rather simple and just meant to be a starting point. You are encouraged to integrate your own vehicle model by implementing the `IVehicleModel` class +To get started with using PacSim, take a look at the [Getting Started README](https://github.com/PacSim/pacsim/blob/master/doc/getting_started.md) here. # Contributing Contributions in any form (reports, feedback, requests, submissions) are welcome. Preferably create an Issue or Pull request for that. @@ -51,4 +46,4 @@ The initial version was developed at Elbflorace by: * Alexander Phieler (Main development) * Niklas Leukroth (Track and Config file parser) * Sergio Antuna (Artwork) -* Tim Hanel (3d car model integration) \ No newline at end of file +* Tim Hanel (3d car model integration) From 49e6b5d4f6d534c6f5dcb72ecae8e39d92659187 Mon Sep 17 00:00:00 2001 From: McDonaldsHappyMeal <140054036+McDonaldsHappyMeal@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:02:28 +1100 Subject: [PATCH 3/3] Update getting_started.md based on Alex's comments --- doc/getting_started.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/doc/getting_started.md b/doc/getting_started.md index 90bf455..209361f 100644 --- a/doc/getting_started.md +++ b/doc/getting_started.md @@ -1,25 +1,29 @@ # Getting started with PacSim -To use PacSim, you need to create a message converter node to match your own interfaces with the simulator. You will need to advertise and publish to some topics. Note that some topics are not directly used in the simulator. +## Interfaces +To use PacSim, you need to create a message converter node to match your own interfaces with the simulator. You will need to advertise and publish to some topics. Note that some topics are not directly used in the simulator with the default vehicle model provided. -| TOPIC | MESSAGE TYPE | DESCRIPTION | USED? | +### Inputs + +| TOPIC | MESSAGE TYPE | DESCRIPTION | USED WITH DEFAULT MODEL? | |------------------------------|----------------------------|---------------------------------------------------------------------------------------|---| | /pacsim/steering_setpoint | pacsim::msg::StampedScalar | Target steering angle at the steering wheel/sensor (rad) | YES | -| /pacsim/torques_max | pacsim::msg::Wheels | Upper bound torque value at each wheel's motor (Nm) | YES | | /pacsim/powerground_setpoint | pacsim::msg::StampedScalar | Powered ground multiplier. 0 for no powered aero, 1 for full capacity (Dimensionless) | YES | -| /pacsim/torques_min | pacsim::msg::Wheels | Lower bound torque value at each wheel's motor (Nm) | NO | | /pacsim/wheelspeed_setpoints | pacsim::msg::Wheels | Target wheel speeds at each wheel's motor (RPM) | NO | +| /pacsim/torques_min | pacsim::msg::Wheels | Lower bound torque value at each wheel's motor (Nm) | NO | +| /pacsim/torques_max | pacsim::msg::Wheels | Upper bound torque value at each wheel's motor (Nm) | YES | -This simulator does not model the interface of a motor controller. It is highly recommended you implement your own internal control loop that controls the amount of torque applied to each wheel to reach a given target wheel speed. Moreover, `torques_max` can be seen more as the "current torque request sent", rather than the upper bound torque value at each wheel's motor. +### Outputs + +TBD + + +## Other notes + +The simulation's interfaces are provided so that motor controllers with an internal control loop for the wheel speeds (e.g. AMK or Electrophorus Engineering) can be fully modelled in the simulator. The default model does not contain this control loop. The values provided for `torques_max` are the actual torques applied to the wheels. The example launch file (example.launch.py) shows an example of how to start the simulator node and the robot_state_publisher for the 3D visualisation of the car. The sensors and vehicle model are configured using config files. Examples are provided in the config folder. Things such as the discipline or the path of the track file or config files are defined using ROS2 parameters. -Future improvements that you may like to consider include, but are not limited to: -- Implement a more accurate vehicle model in the future via the `IVehicleModel` class. -- Improve sensor modelling (e.g. realistic false positive and false negative cone detections) -- Generate ground truth reference trajectory from track YAML files -- External clock control (ability to pause/play at will for debugging purposes) - -### Do you have any ideas? Please feel free to contribute by creating an issue on the repository! +The default vehicle model provided is rather simple and just meant to be a starting point. You are encouraged to integrate your own vehicle model by implementing the `IVehicleModel` class.