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

Model submission for BOSDYN_SPOT and two sensor configs of CTU-CRAS-Norlab #841

Merged
merged 32 commits into from
Apr 16, 2021

Conversation

peci1
Copy link
Collaborator

@peci1 peci1 commented Mar 29, 2021

This PR adds Boston Dynamics Spot robot. It adds robot BOSDYN_SPOT which is the bare platform with no additional sensors. On top of this common base, two sensor configs CTU_CRAS_NORLAB_SPOT_SENSOR_CONFIG_X are submitted.

It is expected that the bare robot model will also be utilized by other teams when submitting their own sensor configs of Spot. We're coordinating the effort together in ctu-vras#1 . It is not expected that the base robot would be used alone without any sensor config - that's why it doesn't have the _sensor_config_x suffix. Sensor config 1 and 2 differ just in the (non-)presence of breadcrumbs.

So far we were unsuccessful collecting the validation data. CTU-CRAS-Norlab's Spots are still fighting with administrative steps for buying them. Teams CoSTAR and MARBLE who have the real robots agreed to help collecting the validation data, but it is unclear whether they will succeed in doing so anytime soon, probably because of COVID-19 restrictions. In the worst case, we have arranged a rental of Spot for end of April/beginning of May, so this is the latest time when the validation data will be provided for sure. This approach was allowed in an email communication with Angela Maio on 18 Feb 2021:

model validation data can be submitted up to 3 months after submission of the model (in accordance with the "Model Validation Sessions" contract deliverable)

The design of flippers and robot body have been already finished, while the top deck and sensor box might still undergo minor changes. I'll try to keep the model up-to-date with latest iterations with the manufacturer (until the PR is merged).

We have already uploaded the validation data ZIP with datasheets of our sensor config's sensors. As said earlier, validation data are missing at the moment. It is impossible to find any detailed specs of the Spot's sensors, so their simulation and specification is just an approximation of what could be devised looking at the robot and data. We used the following information sources:

The robot can be controlled by any force- or postional- control gait generation algorithm. For ease of use, we prepared https://github.com/ctu-vras/subt_spot package which uses CHAMP to generate a simple gait that works on flat ground (it is open-loop, so terrain will be problematic). As this package depends on unreleased ROS packages (CHAMP), we did not include it directly in the SubT repo. Instead, the users should install this package and its dependencies manually in the solution containers.

The model.sdf files should not be edited manually. The model configuration process of Spot starts with Xacro files in urdf/ folder and config files in config/model. A combination of these files yields an intermediate URDF, which is converted to SDF via ign sdf -p and then polished and postprocessed using scripts/clean_sdf. This whole conversion process is done in script scripts/update_robot_sdf. If a change in BOSDYN_SPOT should affect all sensor configs of Spot, the update_robot_sdf script has to be called in each of the packages separately.

There is no URDF file as it is generated on-the-fly by calling scripts/print_robot_urdf script. This script is utilized by launch/description.launch.

The additional sensor configs reuse most of the code and configuration of the base robot and sensor config 1 instead of copy-pasting it.


I was looking into porting gazebo_ros_control to work with Ignition gazebo, but I got quickly completely lost. The main problem is the missing API plugin which would wait for roscore and such things and, most importantly, read and parse the remapping arguments. It seems Ignition Gazebo doesn't yet support plugins that could read the CLI args. That is mostly a show-stopper for any use of ROS in IG. So I ended up writing double-layered plugins - one reads the components of simulator and publishes them on an Ign topic, and the other reads the Ign topic and passes it to ROS. This is not optimal, but as said, there's no way so far to run a ROS publisher inside IG (or I haven't found it).

These plugins might be of more general interest, but due to time constraints, I published them as a part of the bosdyn_spot package:

  • configurable_joint_position_controller
  • logical_contact_system
  • mono_camera_system

The mono_camera_system works around the non-support of mono cameras in IG. It reads the RGB camera and exposes a new topic mono/image which contains the RGB image converted to 8-bit mono. I used the wikipedia-style conversion

L = 0.3*R + 0.6*G + 0.1*B

But the result is weird in places lit by a spot light. I'm not sure if some gamma magic doesn't need to be done before/after the conversion.

@peci1
Copy link
Collaborator Author

peci1 commented Mar 29, 2021

This is a preview of all data produced by the base platform, together with a preview of the walking capabilities:

spot.mp4

@peci1
Copy link
Collaborator Author

peci1 commented Mar 29, 2021

Mobility of the virtual robot together with an example odometry (in this case only base_link->base_footprint).

state_estimation_better.mp4

@peci1
Copy link
Collaborator Author

peci1 commented Mar 29, 2021

A few Gazebo Classic screenshots that might come handy for model assessment.

Please note that the light visuals are affected by the not yet fixed bug gazebosim/gazebo-classic#2947 .

default_gzclient_camera(1)-2021-03-29T02_55_11 806444
default_gzclient_camera(1)-2021-03-29T02_55_29 537756
default_gzclient_camera(1)-2021-03-29T02_55_36 656712
default_gzclient_camera(1)-2021-03-29T02_56_52 454448
default_gzclient_camera(1)-2021-03-29T02_57_40 118042
default_gzclient_camera(1)-2021-03-29T02_58_21 856081

@peci1
Copy link
Collaborator Author

peci1 commented Mar 29, 2021

Proof of working breadcrumb deploy via ROS topic for sensor config 2 :)

2021-03-29T00:31:31 955197026

@peci1
Copy link
Collaborator Author

peci1 commented Mar 29, 2021

Preview of sensors available on CTU_CRAS_NORLAB_SPOT_SENSOR_CONFIG_1:

spot_ctu

Please note that "Omni Front" and "Omni Rear" cameras are upside-down on purpose. This is how the real cameras will be mounted.

@peci1
Copy link
Collaborator Author

peci1 commented Mar 29, 2021

This is the glitch in mono camera rendering I talked about in the first post:

mono_glitch
rgb_glitch

It seems to me that the black parts are mostly in places with strong spotlight illumination. However, it should not be a problem as the mono cameras are just a postprocessing of RGB images...

@peci1
Copy link
Collaborator Author

peci1 commented Apr 4, 2021

I downgraded model.sdf to SDF version 1.6 as requested for all our models.

@acschang
Copy link
Contributor

acschang commented Apr 6, 2021

The initial assessment of the Boston Dynamics' Spot model and associated CTU-CRAS-NORLAB payload is complete however there are some issues to resolve before this model can be merged and utilized in a competitive setting:

Base Spot:

  • Please update BOSDYN_SPOT's IMU parameters to match the new standard SubT IMU parameters.
  • Please add intrinsic values for all camera sensors.
  • Please confirm the robot mass and make sure the mass in specifications.md and model.sdf agree.
  • Please update the endurance to meet the value specified in the specifications.md. This can be done by adjusting the power_load parameter in common.rb to 9.9 as opposed to 4.95.
  • Please provide validation data as it is necessary to complete the evaluation. If not provided, the model's maximum velocity will be limited to 1m/s and battery life set to 60min. When the model validation data can be provided later, please submit a PR updating the model.

CTU-CRAS-NORLAB Payload:

  • Please add intrinsic values for all cameras sensors in the OmniCamera.
  • Please update the Ouster range resolution and stddev values to match the standard in the SubT repository (0.01 for both).
  • Please update IMU parameters on the CTU-CRAS-NORLAB sensor payload to match the new standard SubT IMU parameters.

Please address the issues noted above in this pull request. Once the above issues are fixed, your submission will move onto the next review stage!

@peci1
Copy link
Collaborator Author

peci1 commented Apr 10, 2021

I addressed all of the issues except validation data, which should however be already being collected by CoSTAR.

Base Spot:

  • Please update BOSDYN_SPOT's IMU parameters to match the new standard SubT IMU parameters.
  • Please add intrinsic values for all camera sensors.
  • Please confirm the robot mass and make sure the mass in specifications.md and model.sdf agree.
    • the model I based the work on apparently did not model the 4 kg battery. I added it. That required tuning of the PIDs for CTU_CRAS_NORLAB_SPOT as with the 4 kg more it became very unstable.
  • Please update the endurance to meet the value specified in the specifications.md. This can be done by adjusting the power_load parameter in common.rb to 6.6 as opposed to 4.95.
  • Please provide validation data as it is necessary to complete the evaluation. If not provided, the model's maximum velocity will be limited to 1m/s and battery life set to 60min. When the model validation data can be provided later, please submit a PR updating the model.

CTU-CRAS-NORLAB Payload:

  • Please add intrinsic values for all cameras sensors in the OmniCamera.
  • Please update the Ouster range resolution and stddev values to match the standard in the SubT repository (0.01 for both).
  • Please update IMU parameters on the CTU-CRAS-NORLAB sensor payload to match the new standard SubT IMU parameters.

The body mono camera intrinsics are based on this camera info from the real Spot provided by CoSTAR:


header: 
  seq: 214
  stamp: 
    secs: 1603401456
    nsecs: 366378422
  frame_id: "back_fisheye"
height: 480
width: 640
distortion_model: "plumb_bob"
D: [0.0, 0.0, 0.0, 0.0, 0.0]
K: [257.48651123046875, 0.0, 316.9465637207031, 0.0, 256.9732971191406, 245.06680297851562, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [257.48651123046875, 0.0, 316.9465637207031, 0.0, 0.0, 256.9732971191406, 245.06680297851562, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi: 
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: False

I chose the use the ideal values for cx and cy though, as it doesn't really make sense to use other values in the simulation.

The depth camera intrinsics are so far based on the mono camera, just different resolution. When I get my hands on a camera info from these, I'll update the models to be as close to the real ones as possible.

I also added a link to experimental validation data for Basler cameras on CTU_CRAS_NORLAB_SPOT.

@nkoenig nkoenig requested a review from mjcarroll April 14, 2021 16:20
@peci1
Copy link
Collaborator Author

peci1 commented Apr 15, 2021

Sensor config 2 also works if I manually add the SC1 files in .ignition/fuel cache. What is surprising (or not at all?) is that the previous relative references worked too, in this case (i.e. Fuel had to add the /1 version directory to the mesh URL itself). So maybe the relative references would work, too, but now when the models will already be uploaded to Fuel, having the absolute URLs is better.

@peci1
Copy link
Collaborator Author

peci1 commented Apr 15, 2021

When uploading Sensor Config 1 to Fuel, don't forget that most DAE files in the meshes directory are actually symlinks to bosdyn_spot meshes. So be sure to follow symlinks when uploading.

@mjcarroll
Copy link
Contributor

@acschang anything else from you?

@mjcarroll mjcarroll merged commit acd21f9 into osrf:master Apr 16, 2021
@nkoenig
Copy link
Contributor

nkoenig commented Apr 16, 2021

Bounding box size: [0.87244, 0.448977, 1.07188]

@peci1
Copy link
Collaborator Author

peci1 commented Apr 18, 2021

@mjcarroll I tested both sensor configs and they work well. I tried clearing them from local Fuel cache and starting with sensor config 2, and it correctly downloaded both sensor config 1 and bosdyn_spot.

I've discovered a problem with the use of nodelets, though. See #898 where I disabled running nodelets in nodelet managers to get a more reliable behavior.

@peci1
Copy link
Collaborator Author

peci1 commented Apr 19, 2021

I've seen you assigned CTU-CRAS-Norlab Spot a credit price of 300 credits (on https://app.ignitionrobotics.org/OpenRobotics/fuel/models/CTU_CRAS_NORLAB_SPOT_SENSOR_CONFIG_1 ). I think it is a lot compared to other robots and taking into account how difficult it is to control this robot and how easy it is to tip it over (I haven't found a way to stand it once it falls). If possible, please, reconsider the price, otherwise Spot is practically useless...

@peci1
Copy link
Collaborator Author

peci1 commented Apr 20, 2021

Thanks, I see Angela decreased the cost to 255/280!

nkoenig added a commit that referenced this pull request May 18, 2021
…Norlab (#860)

* Absolem: Added sensor configs 6, 7 and 8.

* remove ros from the x500 plugin (#891)

Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>

* Model Submission for Emesent Hovermap (#892)

* Model submission for Hovermap sensor config 1 from Emesent

Signed-off-by: Rowan Ramamurthy <[email protected]>

* updated specifications for the Emesent Hovermap

Signed-off-by: Rowan Ramamurthy <[email protected]>

* Updated gimbal controller - fixed issue with battery usage

Signed-off-by: Rowan Ramamurthy <[email protected]>

* Specifications updated for emesent hovermap sensor config 1

Signed-off-by: Rowan Ramamurthy <[email protected]>

* Update specifications.md

Signed-off-by: Rowan Ramamurthy <[email protected]>

* Update submitted_models/emesent_hovermap_sensor_config_1/CMakeLists.txt

Co-authored-by: Nate Koenig <[email protected]>

* Added details in the model.config

* Updated the min and max angle for the gpu lidar for the hovermap

* Updating min range and resolution for lidar

* Removing visualisation for lidar

* Added the number of horizontal samples for the gpu to 900

* Updated camera resolution, and also updated the weight in the specifications file to match the sdf values

* Updated noise parameters for the gimbal stabilising imu

* Added /sensor prefix to magnetometer output

* Added sensor prefixes for other sensor outputs

* Updated the imu with the new noise model

* Adding imu topic and specifications as per validation data

* Update submitted_models/emesent_hovermap_sensor_config_1/launch/spawner.rb

Co-authored-by: Nate Koenig <[email protected]>

* Renamed node with repeated name

* Updating the battery plugin to support a 21.6min flight time

* Updated specifications.md to align with provided validation data and spawner.rb accelerations.

* Adjusted limits on gimbals to align with observed behavior in validation data.

Co-authored-by: Rowan Ramamurthy <[email protected]>
Co-authored-by: Peter <[email protected]>
Co-authored-by: Nate Koenig <[email protected]>
Co-authored-by: Peter Milani <[email protected]>

* Model Submission for CTU-CRAS-NORLAB MARV (#886)

* Added CTU_CRAS_NORLAB_MARV_SENSOR_CONFIG_1 (and other sensor configs).

* MARV: prefix links in URDF with robot name.

* MARV: Update RViz config.

* Removed debug prints

* MARV: Added mapping server relay.

* MARV: Downgraded model.sdf to SDF 1.6.

* MARV: Fixed IMU topic.

* MARV: Fixed cliff sensors ROS bridge.

* MARV: Fixed odom rate.

* MARV: Fixed flickering of lights.

* MARV: Update IMU parameters.

* MARV: Added camera intrinsics.

* MARV: Fixed lower bound of temperature for Boson camera.

* MARV: Changed Ouster precision and stddev to 0.01 to follow other SubT sensors.

* Added experimental validation of camera FoV to the specifications.

* Reduced battery life to 60 minutes until validation is complete.  The current maximum velocity and acceleration are set to the default limits for models without validation data.

* Added endurance adjustment to the specifications.md file.

Co-authored-by: Martin Pecka <[email protected]>

* Model submission for BOSDYN_SPOT and two sensor configs of CTU-CRAS-Norlab (#841)

* Spot: First version, has actuators, but no control.

* Spot walking.

* Spot: improved modularity and made CCN_SPOT_SC1 compatible with BOSDYN_SPOT again.

The interface between BOSDYN_SPOT and sensor configs can be considered more or less stable now.

* Spot: Added cameras.

* Spot: Fixed a bug in handling leg collisions.

* Spot: specifications.md

* Spot: Fixed xacro utils to be compatible with MARV.

* Spot: Mono camera now also relays set_rate requests.

* Spot: Fixed IMU bridge.

* Spot: Added payload to CCN_SPOT_SC1.

* CCN_SPOT_SC1: Removed the total_mass_* helper link from URDF to avoid RViz displaying an error.

* Spot: Added CTU_CRAS_NORLAB_SPOT_SENSOR_CONFIG_2.

* CCN_SPOT_SC1: Added specifications.md.

* Spot: Added thumbnails.

* CCN_SPOT_SC1: Added thumbnails.

* Spot: Added mapping server bridge.

* Spot: Downgraded model.sdf to SDF 1.6.

* Spot: update IMU params.

* Spot: Add camera intrinsics.

Body depth camera is still just estimated.

* Spot: Fixed specifications.md part about contact system.

* Spot: Fixed mass by adding battery and tuned the PIDs a bit.

* Spot: Battery life set to 60 minutes.

* CCN_SPOT: Changed Ouster resolution and stddev to 0.01.

* Spot: removed unintentional change.

Signed-off-by: Martin Pecka <[email protected]>

* Spot: Improvements of specifications.md.

* Spot: Adjusted battery life to 60 minutes.

* Spot: Resolved relative references to Fuel parts.

* added feedforward to bridge, controller msgs are now printed only once (#895)

* Set the state properly when recording is complete (#894)

Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>

* Absolem: Remove debug visuals [SDF 1.6] (#878)

* Absolem: Sync Xacro: Change IMU and friction parameters in Xacro to correspond to the desired values in SDF.

* Absolem: Sync Xacro: Re-generate model.sdf using libsdformat 8.9.1 .

This commit makes no real change to the geometry of the model, it just represents some numbers and rotations differently.

* Absolem: Removed empty link visuals as they obstructed the omnicam and were not good for anything else.

* Add missing robot platform types (#890)

* Add missing robot platform types

Signed-off-by: Nate Koenig <[email protected]>

* Added hovermap and marv

Signed-off-by: Nate Koenig <[email protected]>

* Added spot and fix dependency

Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>

* Fix CMakeLists (#897)

* Model Submission for CTU-CRAS-NORLAB Lily hexapod robot, sensor configs 1 and 2 (#867)

* added ctu_cras_norlab_lily ign simulation models

* changed thumbnails

* Fixed links in specifications.md .

* Downgraded model.sdf to SDF 1.6.

* Lily: Corrected mass.

* Lily: Added camera intrinsics.

* Lily: Changed ouster resolution and stddev to 0.01.

* Lily: Changed battery endurance to 60 minutes.

* Lily: Added robot_state_publisher to fill in missing static TFs.

* Lily: Edited Basler cam FOV to match in all places and correspond to intrinsics.

Co-authored-by: petr <[email protected]>
Co-authored-by: Martin Pecka <[email protected]>

* Spot: Disable nodelets because of spurious broken bonds. (#898)

* Model Submission for Coordinated Robotics' Crystal UAV Sensor Config 1 (#866)

* Coordinated Robotics Crystal UAV Sensor Config 1

* Updates based on reviews of other robots

* Camera precedent update, change colors to floats

* Adjust lighting to match camera change

* Update xacro

* Correct down lidar position, set top_scan to zero

Co-authored-by: Kevin <[email protected]>

* Model Submission for Coordinated Robotics Rocky Sensor Configs 1, 2 and 3 (#862)

* Coordinated Robotics Rocky

* Updates based on reviews of other robots

* Remove wheel slip plugin from Ackermann type steering vehicle

* Fixed camera name, changed color to floats

* Update cameras to match precedent

Co-authored-by: Kevin <[email protected]>

* Model Submission Coordinated Robotics Mike (#845)

* Add Coordinated Robotics Mike

* Updates based on reviews of other robots

* Add thermal camera to sensor list, fix wheel plugin wheel diameter, change to floating point colors, increase wheel joint speed

Co-authored-by: Kevin <[email protected]>

* Move battery plugin to the end of plugin list (#901)

Signed-off-by: Michael Carroll <[email protected]>

* fixed pose of rs_up, rs_down rgbd cameras (#903)

* Update robot classes and marsupial pairs (#900)

* Adding lily to include

Signed-off-by: Nate Koenig <[email protected]>

* Added CRYSTAL, MIKE, and ROCKY

Signed-off-by: Nate Koenig <[email protected]>

* Added crystal as marsupial child

Signed-off-by: Nate Koenig <[email protected]>

* Added new Coordinated marsupial pairs, adjusted Karen's collisions, and tweaked a few spawner z-offsets

Signed-off-by: Nate Koenig <[email protected]>

* Remove debug statement

Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>

* Update to use the lattest fog emitter code (#896)

* Update to use the lastest fog emitter code

Signed-off-by: Nate Koenig <[email protected]>

* Merged with master

Signed-off-by: Nate Koenig <[email protected]>

* Adjust pose based on latest emitter model

Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>

* fixed fx, fy focal length of front camera to be consistent with hfov (#907)

* add set_rate service to X500 UAV (#906)

* added feedforward to bridge, controller msgs are now printed only once

* added set_rate services to laser, rgb, rgbd sensors

* dot_generator tweaks for tunnels (#884)

* Unified comms parameters across circuits.

Signed-off-by: Carlos Agüero <[email protected]>

* Absolem: Changed lidar and thermocam parameters, fixed RViz model.

* Absolem: Added Basler cameras intrinsics.

Co-authored-by: Nate Koenig <[email protected]>
Co-authored-by: Nate Koenig <[email protected]>
Co-authored-by: acschang <[email protected]>
Co-authored-by: Rowan Ramamurthy <[email protected]>
Co-authored-by: Peter <[email protected]>
Co-authored-by: Peter Milani <[email protected]>
Co-authored-by: Matej Petrlik <[email protected]>
Co-authored-by: Petr Cizek <[email protected]>
Co-authored-by: petr <[email protected]>
Co-authored-by: knoedler <[email protected]>
Co-authored-by: Kevin <[email protected]>
Co-authored-by: Michael Carroll <[email protected]>
Co-authored-by: Carlos Agüero <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants