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

Add simple ROS-based simulator (using RVIZ for visualization) #350

Closed
wants to merge 67 commits into from

Conversation

whoenig
Copy link
Contributor

@whoenig whoenig commented Mar 29, 2021

Usage:
Terminal 1: roslaunch crazyswarm sim.launch
Terminal 2: python3 example_distributed.py

MauroPfister and others added 2 commits December 17, 2020 18:23
Usage:
Terminal 1: roslaunch crazyswarm sim.launch
Terminal 2: python3 example_distributed.py
@jpreiss
Copy link
Collaborator

jpreiss commented Apr 6, 2021

This looks good! I agree with the overall architectural decisions. Here are a few comments aside from the "NOT IMPLEMENTED"s already mentioned in the code:

  1. The motivation behind example_distributed.py is not obvious to me. The script only does something for the CF with ID 1. Is this supposed to model running one copy of the script per CF, where in a real system the hard-coded 1 would be replaced by e.g. command-line arg? If so, it might be more clear for users if we add comments and show the launching of those scripts in the example.

  2. The name CrazyflieROS is confusing to me, what about CrazyflieROSSim (as used for the node name)?

  3. We need a way to pass arguments like dt, disturbance, and maxVel to the simulator.

@liamcollins
Copy link

Thanks for this!

I'm probably doing something dumb but I've been having some trouble getting sim.launch to run. It seems to have something to with conflicts between python2 and python3? Did you build for this with python2?

@jpreiss
Copy link
Collaborator

jpreiss commented Apr 7, 2021

Looks like the code is only valid python 3 because of the shebang and using print(). It should be easy to modify to python 2.

@liamcollins
Copy link

Just circling back I wound up getting this working on my machine, just had to switch to ROS Noetic/Ubuntu 20, which I'm guessing is probably what Wolfgang is using.

jpreiss and others added 24 commits June 22, 2021 15:24
remove NRF and radio submodules, don't build fw in build.sh
do not assume that joystick 0 must exist
Crazyflie_ros will be deprecated in favor of the Crazyswarm. In order
to avoid unnecessary deep dependencies, we move all the custom messages
and services directly into the Crazyswarm project.

This change also avoids to have crazyflie_cpp twice. Now, only the one
that comes with crazyflie_tools is used.
Remove dependency to crazyflie_ros by adding msg/srv directly here.
Fixes error when retrieving unavailable CF battery status
Change "N/A" -> "Err" as per discussion in #282
This dependency is required if the srv/msg descriptions are in the same
package, see https://answers.ros.org/question/53265/catkin-messages-and-node-in-same-package/

Fixes issue #461.
Add dependency for nodes to messages
In case the motioncapturetype is set to "none", logging is enabled, and
logging_pose is enabled, the current pose will be still shown in rviz.

This is in particular useful for testing with LightHouse, LPS, or flow
deck.
The updated version of libmotioncapture has a refined API, Python
bindings, factory method to avoid repetitive code, and improved
OptiTrack support.
This follows through with the discussion at
#447, namely:

* Remove the (out-of-date) submodules of client and lib
* Update the documentation to advice users to use cfclient for firmware
  updates. This is required, because the most recent update procedure
  also updates the deck firmware (e.g., LightHouse deck).
* Clarify in the documentation, that the Crazyradio firmware has to be
  updated, even for new radios (they ship with an old firmware).
* Remove the prebuilt firmware for STM32 and NRF51 firmwares. Instead,
  specify the last tested official release in the documentation.
Show current pose of the Crazyflies even if no external mocap is used
jpreiss and others added 27 commits September 29, 2021 14:34
…SC-ACTLab/crazyswarm into feature_upgrade_libmotioncapture
do not log point cloud files by default
* SDCC is not required anymore, since we removed the radio-firmware
* ros-[ROS version]-vrpn is not required anymore (VRPN is now a
  submodule of libmotioncapture)
* ros-[ROS version]-joy was missing, see issue #353
Docs: update dependencies for physical experiments
Docs: correct configuration description of external tracking.
Docs: add description of single-marker tracking
Generate "install dependencies" docs from CI script
In the current documentation it remained unclear that we support LPS,
LightHouse etc. This updates the documentation throughout. The biggest
change is in configuration.rst, which required some re-ordering of
paragraphs.

Addresses issue #108.
Docs: Clarify that we support not only mocap for external tracking
* Fix two failing Python Tests on Ubuntu 20.04

* Update test_videoOutput to use the correct Python version
* Add missing information to docs
* List ffmpeg-python and ffmpeg as optional dependency

CI:
* remove unused embedded gcc
* avoid using sudo for pip (this was also causing the documentation to
  suggest using sudo, which is bad practice)

Fixes issue #496
Usage:
Terminal 1: roslaunch crazyswarm sim.launch
Terminal 2: python3 example_distributed.py
* Improved example_distributed
* The new ROS simulator can be used with

$ roslaunch crazyswarm hover_swarm.launch sim:=True
$ (python-script-without --sim-argument)

* Implements some missing features
@whoenig whoenig closed this Oct 15, 2021
jpreiss pushed a commit to jpreiss/crazyswarm that referenced this pull request Mar 16, 2024
server (cflib) implement full state command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants