GithubHelp home page GithubHelp logo

sim_cf's Introduction

Gazebo Simulation for Crazyflie CRTP

This is a flight simulator for the Crazyflie (by bitcraze) multirotors. It principally uses the motor model and some sensors model from RotorS https://github.com/ethz-asl/rotors_simulator . In addition, we added support for both SITL and HITL simulation of the crazyflie using some information gathered from Allan Standard Deviation analysis of each cf2 sensors.

Dependencies

This manual has been tested on a clean Ubuntu 16.04 LTS installation.

Common dependencies

Install basics dependencies and the protobuf library, which is used as interface to Gazebo.

# Basic dependencies
sudo apt-get install git zip qtcreator cmake build-essential genromfs ninja-build -y
# Protobuf , eigen3 and google-glog dependencies
sudo apt-get install protobuf-compiler libgoogle-glog-dev libeigen3-dev libxml2-utils

ROS dependencies

Install ROS for Ubuntu 16.04. This tutorial should also install gazebo7 and gazebo7 dev if the desktop full version has been selected.

You will also need mav-comm and joy package installed on your computer in order to compile the crazyflie_gazebo ROS package

# For Ros Kinetic (Ubuntu 16.04)
sudo apt-get install ros-kinetic-mav-comm ros-kinetic-joy

Also install the package rqt_multiplot necessary for plotting useful data:

sudo apt-get install ros-kinetic-rqt-multiplot

Create and initialize ROS workspace if needed

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ..
catkin_make
echo 'source ~/catkin_ws/devel/setup.bash' >> ~/.bashrc
source ~/.bashrc

Crazyflie client python dependencies

In order to be able to flash the crazyflie with the HITL modifications or the default crazyflie code, you will need to have cfclient installed on your computer. If cfclient is not already installed on your computer, follow this (pip3 is needed) :

cd ~/
git clone https://github.com/bitcraze/crazyflie-clients-python.git
cd crazyflie-clients-python
pip3 install --user -e .

Build crazyflie_gazebo package

Assuming your catkin workspace is in ~/catkin_ws, We need the messages in crazyflie_driver of crazyflie_ros. So clone all the repo if you also want to use ros-related functionnality by crazyflie_ros with the simulation. Therefore first clone the latest crazyflie_ros package from whoenig:

cd ~/catkin_ws/src
git clone https://github.com/whoenig/crazyflie_ros.git
cd crazyflie_ros
git submodule update --init --recursive

Then execute the following commands in order download and build crazyflie_gazebo package :

git clone https://github.com/wuwushrek/sim_cf.git
cd sim_cf/
git submodule update --init --recursive
cd ~/catkin_ws
catkin_make
source devel/setup.bash

Crazyflie-firmware package [Required to do SITL compilation below]

This file contains the source code from bitcraze of Crazyflie. Macros + new files for simulating sensors and others have been added in order to make HITL/SITL with minimum modification (no modification on the overall behavior) of the original code. A new task has been added that replaces syslink/usblink (depending of the type of simulation) and implement a socket client that communicates via UDP with the gazebo server.

Compilation in SITL mode

For SITL, a high performance computer is needed since gazebo simulation and the crazyflie source software will be launched on the same computer. The possibility of using another computer for crazyflie simulation is also implemented. The computer performing the crazyflie simulation and the computer performing gazebo rendering must be able to communicate via socket. No need to install ROS on the first one. Follow this to build crazyflie in sitl mode :

cd ~/catkin_ws/src/sim_cf/crazyflie-firmware/sitl_make
mkdir build
cd build
cmake ..
make

Compilation in HITL mode

To be able to test HITL mode, you may need to compile the source code in HITL mode. Execute the following commands :

cd ~/catkin_ws/src/sim_cf/crazyflie-firmware
make PLATFORM=hitl
# Start crazyflie in bootloader mode then 
make cload

If you wished to compile it in default mode for tests in the real world:

cd ~/catkin_ws/src/sim_cf/crazyflie-firmware
make PLATFORM=cf2
# Start crazyflie in bootloader mode then 
make cload

Crazyflie_gazebo package

Follow documentation on https://github.com/wuwushrek/sim_cf/tree/master/crazyflie_gazebo in order to communicate with the SITL/HITL instance and start playing with the simulation environment. alt text

[Salle LIX] Flying crazyflies out of simulation (Using LPS)

cd ~/catkin_ws/src/sim_cf
git pull

Before everything else, compile and flash the crazyflies with PLATFORM=cf2 as shown above. You can use either the crazyflie-firmware of this package or the original one from bitcraze. Then turn on the crazyflies and put them in the arena.

Now open a console, launch and establish connection with the crazyflie using the launch files crazyflie_add_* from crazyflie_gazebo package :

# For connection with only a single crazyflie -> Modify the uri depending on your platform
roslaunch crazyflie_gazebo crazyflie_add_single.launch

or for launching 2 crazyflies (the script can be easily modified to launch as much crazyflies as desired, just look at the difference between crazyflie_add_single.launch and crazyflie_add_multi.launch):

# For connection with 2 crazyflies -> Modify the uri depending on your platform
roslaunch crazyflie_gazebo crazyflie_add_multi.launch

Now if you want to get more information from the crazyflie, setting to True one of these parameters will do the trick. or you can also add your custom logs as done here.

Also note that the prefix argument here is the prefix that will be applied to all of your ROS topics and service created by crazyflieROS. So in order to be able to launch whatever high level function you want, check that the topic you want to extract or send information are prefixed according to that prefix. For example this is used here in the test_high_level script.py to say that all the topics / custom logs will start with /cf1.

How to use high level functionalities : Example in test_high_level.py

High level functionalities includes takeoff, landing, goTo, uploadTrajectory, startTrajectory and etc... A set of example about using them can be found in the crazyflie_ros package. To be able to use this example script, the connection with the crazyflie has to already be established (either in simulation or on a real crazyflie). the tf_prefix should be the same as the second argument of the constructor here.

cd ~/catkin_ws/src/sim_cf/crazyflie_gazebo/scripts/
python test_high_level.py

This script file is a simple python file that executes a set of example of high level functionnality. These high level functionality are made possible via ROS client/server and ROS topics. First initialize a crazyflie instance (a simple class giving high level ROS functionnality to quickly connect to these topics) like it is done on this line. Then enable the high level functionnality using commander/enHighLvl params. Finally have a look at the prototype of functions here in order to know the different high level functions availabled. An instance of high level functionality is the taking off functionality. Taking off only required these lines if and only if all the previous steps have been done.

How to send setpoint position/velocity/attitude

To send a target in position, positions information have to be send continuously on the cf_prefix/cmd_position topic. for velocity on cf_prefix/cmd_vel. An example of how to do it can be found in the fancy_traj.py. This file generates some basic trajectory and send the different points of the trajectory over cmd_position topic. To use it :

cd ~/catkin_ws/src/sim_cf/crazyflie_gazebo/scripts
python fancy_traj.py
# write the trajectory you want amongst the proposed list and type enter

How to monitor real crazyflie using gazebo environment

In this section, it is possible to monitor in the gazebo environment what the real crazyflie is doing. Basically just showing in the virtual environment the actual position/orientation of the crazyflie and a ghost following it target position and orientation. To use that, be sure that you are already connected to crazyflie and that you have a custom log that gives you at least position and/or euler angles, in that case :

roslaunch gazebo_ros empty_world.launch world_name:=$HOME/catkin_ws/src/sim_cf/crazyflie_gazebo/worlds/salle_lix.world

# Spawn a ghost that will follow target point sent to the crazyflie
roslaunch crazyflie_gazebo spawn_ghost.launch allow_collision:=false modelName:=noCollisionGHost poseTopic:=/cf1/target_position

# Spawn a ghost that will follow the true position/orientation of the crazyflie in the real world
roslaunch crazyflie_gazebo spawn_ghost.launch allow_collision:=true modelName:=realcf1 poseTopic:=/cf1/local_position color_prop_front:=Blue color_prop_back:=Red

Here, the poseTopic should target the topic you want the ghosts to follow. So the prefix used should be identical to the prefix where the position/orientation of the crazyflie is published. You can add as much ghosts as wished for different crazyflies in the real environment.

Making some plots rqt_multiplot

When the crazyflie has been put in the arena, it is possible to visualize its 3D position in real time using rqt_multiplot. Follow the description on this ROS page if you wish to customize your own plots. A configuration file that plots x(t),y(t),z(t),y(x),z(y),z(x),roll(t),pitch(t),yaw(t) and their target is already been proposed for a crazyflie prefixed by cf1. To change the prefix, replace all occurence of cf1 in the configuration file by the prefix wished. Then launch the following command :

rqt_multiplot --multiplot-config ~/catkin_ws/src/sim_cf/crazyflie_gazebo/launch/mylog_plot.xml

alt text

sim_cf's People

Contributors

arpafaucon avatar jonasdn avatar wuwushrek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sim_cf's Issues

Flying with a single real crazyflie (Using LPS) - Could not find param /commander/enHighLevel

Hi there,
As I mentioned in the Bitcraze forum (https://forum.bitcraze.io/viewtopic.php?f=2&t=2929&start=20), we have our LPS system with 8 nodes is installed. I have tested their functionality with cflib, in addition to crazyflie-ros and they are working as they supposed to. Since we are working with your version on SITL for a while, it is really exciting to have a chance to apply our work to real systems.
When I try to do that, I successfully start the server and add a crazyflie under /cf1 namespace with corresponding URI, I can even echo the pose topic. Unfortunately after that, I can not go further with test_high_level.py, having an error saying that;

[ERROR] [1535978471.370209333]: [/cf1] Could not find param /commander/enHighLevel

In addition, there is a constant low link quality error which I do not face with in other alternatives (cflib and crazyflie-ros). One think I am suspecting is that the firmware. In our cfs, the official release of crazyflie-firmware (2018.01) is uploaded. Should we use the source code in your workspace for the firmware to be uploaded to cfs?

Did you ever tried real cfs+LPS combination and if you do, which firmwares were uploaded? At least, do you have any suggestion for the problems we are facing with?

Thanks in advance,
screenshot from 2018-09-03 16-18-06

GHosting mode issue and explicit message for failed connexion with cf

  1. OK. It could be useful for the end-user to have some advice about this error ( a more descriptive error message)

  2. in ghosting mode , if I move the drone in the room, at some point the position stops being updated (topic, and visually on gazebo), and the problem persists until I restart crazyflie_server (bringing the drone close to the radio again is not enough)

Originally posted by @Arpafaucon in #2 (comment)

Gazebo crash on /delete_model service calls

Context

I was investigating the use of service gazebo/delete_model to clean up gazebo simulation without having to restart the server every time.
In current setup, re-spawning cf1, cf2, etc. fails as there are already existing models with that name. The objective was to ask gazebo to remove them before adding them back.

My scripts are however causing a runtime_error what()=timeout in gazebo server, that terminates.

Script

#!/bin/bash
rosservice call --wait /gazebo/delete_model "model_name: 'cf1'" && # ok
rosservice call --wait /gazebo/delete_model "model_name: 'cf2'" && # ok
rosservice call --wait /gazebo/delete_model "model_name: 'handler1'" && # crashes
echo "killed all gazebo models. Killing ./cf2 instances"
killall cf2

output:

arpad@APD-X3:~/dev/sp/migws/src/sp/sp_mate$ rosrun sp_mate clean_cf2.sh
success: True
status_message: "DeleteModel: successfully deleted model"
success: True
status_message: "DeleteModel: successfully deleted model"
ERROR: transport error completing service call: unable to receive data from sender, check sender's logs for details

Questions:

  • is it a bug ?
  • is there another way to close the handler ? This is probably related to the fact that I'm not sure I get what the handler's job is.

Not working with more than 6 Crazyflies

Whenever I spawn more than 6 Crazyflies, I get this error:

[Err] [TransportIface.cc:395] Unable to connect to master.
[Err] [GLWidget.cc:856] Unable to connect to a running Gazebo master.
Segmentation fault (core dumped)
[gazebo-2] process has died [pid 12143, exit code 139, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -u --verbose -e ode /home/esoria/catkin_ws/src/crazyflie_gazebo/worlds/basic.world __name:=gazebo __log:=/home/esoria/.ros/log/2f4ede52-11db-11ea-898d-d89ef326063d/gazebo-2.log].
log file: /home/esoria/.ros/log/2f4ede52-11db-11ea-898d-d89ef326063d/gazebo-2*.log

OR I don't receive the following

COMM: PARAM service init finished 
COMM: COMM init succeed 
SYS: Commander init finished 
SENSORS: Forcing sensors to SensorImplementation_sim
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Estimator type forced
ESTIMATOR: Using estimator 2
CONTROLLER: Using controller 1
SYS: stabilizer init finished 
SYS: Memory init finished 
SENSORS TEST PASSED [OK].
SYS: ALL TESTS PASSED ! System started... 
GYro Bias found 
GYro Bias found 
GYro Bias found 
GYro Bias found 
GYro Bias found 
GYro Bias found 

In any case, I can't run more than 6. Is it a known issue?

Thank you for your work and help!
Enrica

Unclear on how to retrieve drone location

I wasn't able to understand how we are supposed to get the drone positions.
explored options :

  • tf
    in the current setup, no transforms are published. I believe that is quite weird given what I understood from the internals of crazyflie_driver. And from you crazyflie.py module ( that had by the way a weird way to handle constructor arguments, see crazyflie.tool module where I tried to correct it...but without tf it still doesn`t work

  • /cf/local_position topic
    That way I get a 6-d vector, the 3 first being the pose. However, the last three don't seem to map to roll, pitch, yaw.
    According to crazyflie_add_single.launch , these value correspond to

    "stabilizer.roll", "stabilizer.pitch", "stabilizer.yaw"

    Although the models in gazebo are perfectly horizontal, those values (roll, pitch) are non-null.

  • cf/pose topic (mentionned in crazyflie_visu.rviz file)
    I don't have this topic

Do you have any advice on that matter? That might be useful to mention that in the documentation

Keep/Delete OpenCV dependency

Description

I was doing a full installation test to list dependencies for my project.
It seems that the full OPENCV library is required. However the library usage seem quite small.

find_package(OpenCV REQUIRED)

Current usage

It seems to be used for scaling some measures, but given the TODO message, I'm not sure something is happening.

if (_sdf->HasElement("covarianceImage")) {
    std::string image_name =
      _sdf->GetElement("covarianceImage")->Get<std::string>();
    covariance_image_ = cv::imread(image_name, CV_LOAD_IMAGE_GRAYSCALE);
    if (covariance_image_.data == NULL)
      gzerr << "loading covariance image " << image_name << " failed"
            << std::endl;
    else
      gzlog << "loading covariance image " << image_name << " successful"
            << std::endl;
  }
// ...
// This gets called by the world update start event.
void
GazeboOdometryPlugin::OnUpdate(const common::UpdateInfo& _info)
{
// ...
int x =
      static_cast<int>(std::floor(gazebo_pos_x / covariance_image_scale_)) +
      width / 2;
    int y =
      static_cast<int>(std::floor(gazebo_pos_y / covariance_image_scale_)) +
      height / 2;

    if (x >= 0 && x < width && y >= 0 && y < height) {
      uint8_t pixel_value = covariance_image_.at<uint8_t>(y, x);
      if (pixel_value == 0) {
        publish_odometry = false;
        // TODO: covariance scaling, according to the intensity values could be
        // implemented here.
      }
  }
// ...
}

Propositions

At least, this issue will remind you of this waiting TODO. ๐Ÿ˜„

  • If this is feature you actually use, would it be possible to define what opencv modules are required ?
  • If this is a left-over, would you consider removing the dependency to openCV2 ? This will become increasingly difficult to satisfy.

dynamic model instabilities when simulation time fluctuates

Context

I observe drone instabilities:

  • if I pause then resume the simulation
  • if I move gazebo client 3D view a lot

Drones have trouble staying in place, and eventually crash into the ground

I believe that might be related to some time integration issues.

Problem with ros melodic and gazebo 9

hello, I would like to solve my problem, i to try install a plugin to gazebo but when I write the make comand on my terminal, show this erro:

/home/matheus/catkin_ws/bluerov_simulation/freebuoyancy_gazebo/src/freebuoyancy.cpp:13:10: fatal error: gazebo/math/Pose.hh: No such file or directory
#include <gazebo/math/Pose.hh>

this is the plungin link:

https://gist.githubusercontent.com/monabf/bc04b7ab366f812c645bf0aa6f22c8de/raw/e8f7d0a9f4bc8add7909722f37416d74f383f811/bluerov2_ardusub_sitl_tutorial.txt
I'm new in gazebo and ros.

Error when leveraging handler's `start_index` arg during spawn

Overview

When experimenting with mixed-reality scenarios (some real drones, and some virtual ones), I noticed some use cases that aren't working properly. I'll describe them once I manage to reproduce them from scratch.

1 - Handler cannot handle start_index>1

Steps to reproduce

  1. Launch gazebo server
  2. Launch crazyflie_server
  3. Launch one cf2 instance: run_cfs 1
  4. Launch launch file below . It spawns one drone with prefix cf2, and registers it
<?xml version="1.0"?>

<launch>
    <!-- Gazebo model argument -->
    <arg name="mav_name" default="crazyflie"/>

    <!-- Handler arguments -->
    <arg name="cfPrefix" default="cf" />
    <arg name="uri" default="INADDR_ANY://19950"/>
    <arg name="handlerName" default="handler1"/>

    <!-- Arguments for second Crazyflie -->
    <arg name="tf_prefix_2" default="$(arg cfPrefix)2" />
    <arg name="color_prop_front_2" default="Red" />
    <arg name="color_prop_back_2" default="Red" />
    <arg name="x_2" default="1.5" />
    <arg name="y_2" default="1.0" />
    <arg name="z_2" default="0.03" />


    <group ns="$(arg cfPrefix)2">
        <include file="$(find crazyflie_gazebo)/launch/spawn_mav.launch">
            <arg name="tf_prefix" value="$(arg tf_prefix_2)"/>
            <arg name="color_prop_front" default="$(arg color_prop_front_2)" />
            <arg name="color_prop_back" default="$(arg color_prop_back_2)" />
            <arg name="x" default="$(arg x_2)"/>
            <arg name="y" default="$(arg y_2)"/>
            <arg name="z" default="$(arg z_2)"/>
        </include>
    </group>

    <group ns="handler1">
        <include file="$(find crazyflie_gazebo)/launch/spawn_plugin.launch">
            <!--<arg name="handlerName" value="$(arg handerName)" />-->
            <arg name="plugin_name" value="handler1" />
            <arg name="nbQuads" value="1" />
            <arg name="cfPrefix" value="$(arg cfPrefix)" />
            <arg name="uri" value="$(arg uri)" />
            <arg name="firstIndex" value="2" />
            <!-- First crazyflie index -->

            <arg name="enable_logging" value="true"/>
            <arg name="enable_parameters" value="true"/>
            <arg name="use_ros_time" value="true"/>
            <arg name="enable_logging_imu" value="False"/>
            <arg name="enable_logging_temperature" value="false"/>
            <arg name="enable_logging_magnetic_field" value="false"/>
            <arg name="enable_logging_pressure" value="false"/>
            <arg name="enable_logging_battery" value="false"/>
            <arg name="enable_logging_packets" value="false"/>
        </include>
    </group>
</launch>

Observed behaviour

The crazyflie_server spawns a drone under cf257.
The gazebo server spawns a drone under cf2, and crashes.

greg@salade:~$ roslaunch sp_mate servers.launch 
... logging to /home/greg/.ros/log/25ff6400-40e6-11e9-88c3-509a4c55508a/roslaunch-salade-679.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://salade:37484/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /use_sim_time: True

NODES
  /
    crazyflie_server (crazyflie_driver/crazyflie_server)
    gazebo (gazebo_ros/gzserver)

ROS_MASTER_URI=http://localhost:11311

process[gazebo-1]: started with pid [702]
process[crazyflie_server-2]: started with pid [707]
Gazebo multi-robot simulator, version 7.0.0
Copyright (C) 2012-2016 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[ INFO] [1551973375.429592052]: Finished loading Gazebo ROS API Plugin.
[Msg] Waiting for master.
[ INFO] [1551973375.430879048]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 129.104.49.16
[ INFO] [1551973376.719037912, 0.024000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1551973376.788100173, 0.090000000]: Physics dynamic reconfigure ready.
[Dbg] [gazebo_pressure_plugin.cpp:49] _model = cf2
[Dbg] [gazebo_magnetometer_plugin.cpp:252] ~/cf2/gazebo/magnetic_field
[Dbg] [gazebo_cfHandler_plugin.cpp:26] Load() called.
[Dbg] [gazebo_cfHandler_plugin.cpp:35] namespace_ = "/handler1/".
[Dbg] [gazebo_cfHandler_plugin.cpp:91] LogBlocks size = 1 for Handler : handler1
[Dbg] [gazebo_cfHandler_plugin.cpp:106] Simulation is in SITL mode with address,port :  INADDR_ANY , 19950 for Handler : handler1
[Dbg] [gazebo_cfHandler_plugin.cpp:155] Receiver, sender task created for Handler : handler1
[ INFO] [1551973397.511273488, 20.562000000]: [cf257] Creating CrazyflieROS services 
Segmentation fault (core dumped)
[gazebo-1] process has died [pid 702, exit code 139, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver --verbose -e ode /home/greg/migws/src/sim_cf/crazyflie_gazebo/worlds/basic.world __name:=gazebo __log:=/home/greg/.ros/log/25ff6400-40e6-11e9-88c3-509a4c55508a/gazebo-1.log].
log file: /home/greg/.ros/log/25ff6400-40e6-11e9-88c3-509a4c55508a/gazebo-1*.log

no "gyrobias"showing in the console

After I launched the crazflie_sim.launch and ran the ./run_cfs.sh file, no "gyrobias" show in the console where the crazylfie has been launched. However, the console just end up with "[ INFO] [1641052729.099733135]: [cf1] Elapsed: 4.549269 s". I also tried to pulish the commomd topics but all failed.
Can you tell me how to solve it? Thanks!

velocity command publication

I publish a constant linear velocity command on > cmd_vel topic, but Crazyflie does not follow the command. So how do you give velocity command to Crazyflie?

Migration to Gazebo 9 / ROS melodic

The current code base is usable with gazebo 7 only.
I'm opening the current issue to think about ways to (elegantly) make it usable with gazebo 9 as well, and track the overall progress

References

Migration guide

https://bitbucket.org/osrf/gazebo/src/default/Migration.md?fileviewer=file-view-default

API docs

http://osrf-distributions.s3.amazonaws.com/gazebo/api/1.4.0/namespacegazebo.html
https://ignitionrobotics.org/api/math/4.0/annotated.html

Proposed migration

  • find a proper way to detect current Gazebo version
#define GAZEBO_9 (GAZEBO_MAJOR_VERSION >= 9)
  • use ignition::math instead of gazebo::math
    • gazebo::math::Vector3 -> ignition::math::Vector3
    • same with Pose3 -> Pose3d
  • change getters/setters GetX() to X()
  • Events are automatically disconnected when deleted in v9, remove events::Events::Disconnect***() from destructors

Notes

gazebo::math::Vector3 implicitely contains doubles, that is not the case of ignition::math::Vector3. The closest translation is Vector3d

/cmd_vel not working in SITL simulations

Hello!

I have cloned the crazyflie_ros package and I'm I am unsuccessfully trying to run the script in the folder crazyflie_demo, such as const_thrust.py. Instead, all the scripts in crazyflie_gazebo work properly. Is there any reason why this happens? Are they meant to work in SITL simulations?

Cheers,
Enrica

Compile error on Ubuntu 20.04

[100%] Building CXX object crazyflie_ros/sim_cf/crazyflie_gazebo/CMakeFiles/rotors_gazebo_imu_plugin.dir/src/gazebo_imu_plugin.cpp.o
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [crazyflie_ros/sim_cf/crazyflie_gazebo/CMakeFiles/gazebo_cfHandler_plugin.dir/build.make:63: crazyflie_ros/sim_cf/crazyflie_gazebo/CMakeFiles/gazebo_cfHandler_plugin.dir/src/gazebo_cfHandler_plugin.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:7105: crazyflie_ros/sim_cf/crazyflie_gazebo/CMakeFiles/gazebo_cfHandler_plugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/bitcraze/catkin_ws/src/crazyflie_ros/sim_cf/crazyflie_gazebo/src/gazebo_odometry_plugin.cpp: In member function 'virtual void gazebo::GazeboOdometryPlugin::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)':
/home/bitcraze/catkin_ws/src/crazyflie_ros/sim_cf/crazyflie_gazebo/src/gazebo_odometry_plugin.cpp:100:48: error: 'CV_LOAD_IMAGE_GRAYSCALE' was not declared in this scope
  100 |     covariance_image_ = cv::imread(image_name, CV_LOAD_IMAGE_GRAYSCALE);
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~

Erratic behaviour with multiple crazyflies

Hi,

I am launching the multiple_cf_sim.launch file with 4 cfs just as it is in the crazyflie_gazebo pkg.
After takeoff, I launch a node within each namespace (cf1 to cf4) that publishes to the cmd_hover topic of that namespaces with values:

crazyflie_driver::Hover vel;
vel.vx=0.2; vel.vy=0.0; vel.zDistance=0.5;
vel.yawrate=50.0;

However, after a while I start get unstable behaviours for no apparent reason. I attach a link to a video below where this behaviour happens more precisely at 1:08 / 1:48 / 2:07 / 2:15 / 2:20 and 2:58.

https://youtu.be/EOnd7kAexIQ

@Arpafaucon in this issue #8 says such issues might be due to the computer specs, but I'm running this on i7 with 32Gb of ram and none of which is fully used when I check it with htop.

Any help is greatly appreciated.

Install crazyflie module to PYTHON_PATH

Context

It is currently impossible to use the crazyflie module from outside the package.

Objective

make the module importable from outside (see suggestion below)

from crazyflie_gazebo.tools import crazyflie

Current progress

I am looking into it. That seems possible, I haven't found the proper settings yet.
A promising link is here : https://www.google.com/url?q=http://wiki.ros.org/rospy_tutorials/Tutorials/Makefile&sa=U&ved=2ahUKEwjIlLD71argAhVPhRoKHXSsDMgQFjABegQICRAB&usg=AOvVaw20slr_vIeR9qb5tP-JP5mM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.