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

libgz-sim7-dev #28

Closed
wants to merge 38 commits into from
Closed

libgz-sim7-dev #28

wants to merge 38 commits into from

Commits on Jan 19, 2021

  1. JSON: initial steps to convert ardupilot_gazebo to use the SITL JSON …

    …interface
    
    1. Add package dependency on jsoncpp. Use this library as there is already an implicit dependency on it via Gazebo.
    2. Add example executable to create the JSON message required by SITL.
    srmainwaring committed Jan 19, 2021
    Configuration menu
    Copy the full SHA
    5a0614e View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2021

  1. JSON: add stand alone example to test SITL JSON socket interface

    1. add a stand alone executable that connects to the SITL socket
    2. WIP: data is received from SITL but the output JSON data is not recv by SITL
    srmainwaring committed Jan 20, 2021
    Configuration menu
    Copy the full SHA
    ee0bc5d View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2021

  1. JSON: update add c++ socket example

    1. Use copy of ArduPilot SocketAPM class for socket handling - consistent with SITL.
    2. Add stripped down python example from the SITL examples to establish connection with SITL. This version has no physics (static model).
    3. Rework c++ example to connect to SITL. Now working after using jsoncpp stream writer to generate JSON string removing all indentation and newlines.
    srmainwaring committed Jan 21, 2021
    Configuration menu
    Copy the full SHA
    28a77b7 View commit details
    Browse the repository at this point in the history
  2. JSON: update ArduPilotPlugin to use the SITL JSON interface

    1. Initial draft of ArduPilotPlugin using SITL JSON. Two way connection operational but subject to many timeouts.
    srmainwaring committed Jan 21, 2021
    Configuration menu
    Copy the full SHA
    af6ed39 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2021

  1. JSON: replace jsoncpp with rapidjson

    1. Writing JSON was a performance bottleneck. Replace jsoncpp with the faster rapidjson (also header only).
    2. Update examples and plugin.
    3. Further adjustments to connection and timeout tests - further work still required.
    srmainwaring committed Jan 22, 2021
    Configuration menu
    Copy the full SHA
    9cfdca0 View commit details
    Browse the repository at this point in the history
  2. JSON: update socket timeout in ArduPilotPlugin

    1. Reduce the timeout for socket.recv to prevent ReceiveMotorCommand from blocking the main Gazebo update loop.
    2. Re-enable the code to drain the socket
    3. Remove the Time::NSleep(100) from the timeout check block
    srmainwaring committed Jan 22, 2021
    Configuration menu
    Copy the full SHA
    c281221 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2021

  1. JSON: refactor param names, move loading of sensor params to separate…

    … functions
    
    1. Provide more descriptive names for addresses and ports
    2. Create new functions to load sensor parameters and split up the main load function
    3. Update comments and messages
    srmainwaring committed Jan 23, 2021
    Configuration menu
    Copy the full SHA
    e5ee968 View commit details
    Browse the repository at this point in the history
  2. JSON: enable check for STIL JSON protocol magic

    1. ReceiveServoPacket will return directly if no packet is received or the protocol byte is incorrect.
    srmainwaring committed Jan 23, 2021
    Configuration menu
    Copy the full SHA
    930c9e2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c8154eb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a4379cb View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2021

  1. JSON: revert the deprecation of the fdm_port_in parameter

    1. revert the deprecation of the fdm_port_in parameter as a review of the SITL JSON code reveals that both the FDM server address and port can still be overridden in the STIL instance.
    srmainwaring committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    666163c View commit details
    Browse the repository at this point in the history
  2. Models: remove the xml namespace from the iris model <sdf> element

    Remove the xml namespace attribute from the iris model as prevents the model from loading in Gazebo 11.
    srmainwaring committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    860f599 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2021

  1. JSON: add optional servo limits params to each servo controller

    1. Add optional params <servo_min> and <servo_max> to the servo controllers
    2. The JSON interfaces sends raw PWM values that are not necessarily in [1000, 2000], this changes allows a model to configure different servo limits if necessary
    3. Update the command calculation using new limits.
    4. Use conditional compilation to disable dev debug code.
    srmainwaring committed Jan 27, 2021
    Configuration menu
    Copy the full SHA
    1f5a851 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2021

  1. JSON: update CMakeLists.txt

    Update package name for RapidJSON in CMakeLists.txt
    srmainwaring committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    7c02d89 View commit details
    Browse the repository at this point in the history
  2. JSON: add install instructions

    Add install instructions for Ubuntu
    srmainwaring committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    c42e626 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2021

  1. JSON: remove socket and JSON examples

    Remove the JSON and socket C++ and Python examples.
    Remove the anemometer sensor world example
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring committed Apr 27, 2021
    Configuration menu
    Copy the full SHA
    1f66d6f View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2021

  1. [IGN] migrate plugin using the json backend to ignition-edifice

    - Update the plugin to use the ignition-gazebo interfaces following @gerkey's migration guide
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring committed Aug 23, 2021
    Configuration menu
    Copy the full SHA
    201509d View commit details
    Browse the repository at this point in the history
  2. [IGN] ensure the imu name is captured correctly

    - Fix bug where the imu name is stored in a temporary.
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring committed Aug 23, 2021
    Configuration menu
    Copy the full SHA
    fc7b7f7 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2021

  1. [IGN] update iris_with_standoffs model to use additional sdf params f…

    …or json backend
    
    - Add <servo_min> and <servo_max> params.
    - Add <useForce> param
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring committed Aug 24, 2021
    Configuration menu
    Copy the full SHA
    dc5a49b View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2021

  1. [IGN] update iris_with_standoffs model to use force controlled joints

    - Set parameter <useForce>1</useForce> as setting joint velocities directly does not work.
    srmainwaring committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    db7d05a View commit details
    Browse the repository at this point in the history
  2. [IGN] remove commented code and adjust formatting

    - Remove commented code from Socket and ArduPilotPlugin
    - Adjust namespace formatting
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    9ac286e View commit details
    Browse the repository at this point in the history
  3. [Iris] update colours for quadcopter model

    - Replace Gazebo material scripts with equivalent ambient, diffuse, specular elements compatible with Ignition.
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    81ec53b View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2021

  1. [Zephyr] add zephyr plane model and demo world (ArduPilot#1)

    Add an ArduPilot enabled Zephyr delta wing adpated from the
    model provided by OpenRobotics.
    
    The model is configured to work with ignition-gazebo. Changes include:
    
    - Rename the model to avoid conflict
    - Update the location of the wing mesh texture in the collada file
    - Disable the GPS sensor
    - Use the ignition-gazebo version of the lift-drag plugin
    - Provide a new runway / ground plane model for demonstration
      (contains assets from ambientCG.com, licensed under CC0 1.0 Universal:
      textures https://ambientcg.com/view?id=Grass004)
    - Update the iris_arducopter_runway world to use the new model
    - Clean up CMakeLists.txt to use ignition conventions
    - Only require ignition-gazebo package as other dependencies
      are pulled in recursively.
    - This version of the mode will fly with ArduPilot plane4.1
    - Add imu link and set pose: <pose>0 0 0 3.141593 0 -1.5707963</pose>.
      This is to adjust for the Zephyr model having a non-standard orientation (x : -R, y : -F, z : -D)
    - Add joint-force system plugins
    - Add ArduPilot plugin and configure:
    - Gazebo body frame to ArudPilot FRD has an extra rotation about z
      to correct for the non-standard wing orientation.
    - Gazebo world to NED is the usual rotation
    - The elevon mappings are different from the model in SwiftGust's repo.
      The elevon channels are swapped and no servo reverse is required.
    - Upstream: gazebo-zephyr.parm needs to have
      SERVO1_REVERSED = 0
      SERVO2_REVERSED = 0
    - Orient the model for vertical takeoff
    - Update the default transform for rotating from the Gazebo world frame to NED.
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring authored Sep 16, 2021
    Configuration menu
    Copy the full SHA
    fd00f11 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2021

  1. [IGN] update the frame conversion calculation to use pose composition (

    …ArduPilot#3)
    
    - Document the frame conversion calculations needed to move from Gazebo to ArduPilot (aircraft) conventions
    - Use the Pose3d composition operator (operator*) to simplify the pose calculations and align the code with the documentation
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring authored Sep 20, 2021
    Configuration menu
    Copy the full SHA
    49a5e52 View commit details
    Browse the repository at this point in the history
  2. [Iris] add example for Iris based upon the edifice-demo depot world (A…

    …rduPilot#4)
    
    - Include the iris_with_standoffs model in the OSRF edifice-demo-world and add the ignition::gazebo::system::Imu plugin.
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring authored Sep 20, 2021
    Configuration menu
    Copy the full SHA
    cda31ad View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2021

  1. [IGN] bug fix - last controller update time should not be updated if …

    …state is not sent (ArduPilot#5)
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring authored Sep 22, 2021
    Configuration menu
    Copy the full SHA
    56a6faf View commit details
    Browse the repository at this point in the history
  2. Add support for lock-step simulation (ArduPilot#6)

    * [Lock-Step] add define to display debug information for JSON
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    
    * [Lock-Step] split the creation and sending of the JSON state and cache the state between updates
    
    - Add function CreateStateJSON that creates and caches the state JSON string
    - Modify the function SendState to send the cached JSON state
    - This is to allow the JSON state to be resent to the controller if required
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    
    * [Lock-Step] move the update of motor commands to a separate function
    
    - Move the servo packet declaration to the header
    - Move the conversion of PWM values to motor commands to a separate function
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    
    * [Lock-Step] check the simulation is not paused in the pre and post update steps
    
    - Check that the simulation is not paused before receiving or sending state
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    
    * [Lock-Step] removed unused debug checks
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    
    * [Lock-Step] add logic to enforce lock-step and a plugin parameter to toggle
    
    - Add parameter <lock_step> which is set to true to enforce lock-step simulation
    - Update the Iris and Zephyr models to use lock-step
    - Modify PreUpdate when in lock-step mode
    	- Keep calling ReceiveServoPacket until a packet is received
    - Modify ReceiveServoPacket when in lock-step mode
    	- Resend the state if no data received from the controller instead of timing out
    	- Resend the state if a duplicate servo packet is received
    - Fix a bug in the missed frames warning message
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    
    * [Lock-Step] add signal handler and break out of the receive servo packet loop when a signal is received
    
    - Add a signal handler to allow the plugin to exit cleanly on Ctrl-C.
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring authored Sep 22, 2021
    Configuration menu
    Copy the full SHA
    3b0dc18 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2021

  1. Forward port to support ignition garden: ignition-gazebo5 to ignition…

    …-gazebo7
    
    - Use new interface on EntityComponentManager::CreateComponent
    - Remove unused package dependencies from CMakeLists.txt
    - Update dependency to ignition-gazebo7
    srmainwaring committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    e407fad View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2022

  1. Forward port ignition-edifice -> ignition-garden

    - Fixed git URL
    tridge authored and srmainwaring committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    28e6a01 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2022

  1. Ensure the model base link is set to the correct model

    - Set the link for the IMU contained in this model - the ECM foreach iterates over all model components in the world.
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    srmainwaring committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    9f6330d View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2022

  1. Remove unused includes

    clydemcqueen authored and srmainwaring committed Mar 28, 2022
    Configuration menu
    Copy the full SHA
    b5aa171 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bb2ce98 View commit details
    Browse the repository at this point in the history
  3. Fix: use copied imuMsg

    clydemcqueen authored and srmainwaring committed Mar 28, 2022
    Configuration menu
    Copy the full SHA
    fe01601 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2022

  1. Readme: re init readme

    khancyr authored and srmainwaring committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    bf9af69 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3d4c781 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2022

  1. Add COMMAND control type (ArduPilot#18)

    * Add RELAY control type
    
    * Rename new control type from RELAY to COMMAND
    
    - Minor updates to parameter documentation
    - Rename new control type to COMMAND
    - Add dependency on World utility and use it to fully scope command topic names
    - Remove work-around for ArduSub as the initialisation issue should be fixed upstream
    
    Signed-off-by: Rhys Mainwaring <[email protected]>
    
    Co-authored-by: Clyde McQueen <[email protected]>
    srmainwaring and clydemcqueen authored Mar 31, 2022
    Configuration menu
    Copy the full SHA
    aaffdc0 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2022

  1. IGN -> GZ (ArduPilot#27)

    * ign -> gz: namespaces
    
    * IGN to GZ
    
    Signed-off-by: ahcorde <[email protected]>
    
    * update README.md
    
    Signed-off-by: ahcorde <[email protected]>
    
    * Added reset
    
    Signed-off-by: ahcorde <[email protected]>
    
    * Update
    
    Signed-off-by: ahcorde <[email protected]>
    
    * more updates
    
    Signed-off-by: ahcorde <[email protected]>
    
    * clean worlds
    
    Signed-off-by: ahcorde <[email protected]>
    
    * more ign to gz
    
    Signed-off-by: ahcorde <[email protected]>
    
    Signed-off-by: ahcorde <[email protected]>
    Co-authored-by: Gustavo <[email protected]>
    ahcorde and Rezenders authored Aug 16, 2022
    Configuration menu
    Copy the full SHA
    65dded5 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2022

  1. libgz-sim7-dev

    Rezenders authored Oct 18, 2022
    Configuration menu
    Copy the full SHA
    9c1d365 View commit details
    Browse the repository at this point in the history