Coder Social home page Coder Social logo

zilantrobotics / innopolis_vtol_dynamics Goto Github PK

View Code? Open in Web Editor NEW
39.0 3.0 8.0 4.02 MB

Cyphal/DroneCAN UAV HITL simulator

License: GNU General Public License v3.0

Shell 88.22% Dockerfile 11.78%
ros simulation drone uav robotics uavcan cyphal dronecan

innopolis_vtol_dynamics's People

Contributors

frontw avatar jlo6ctep avatar ponomarevda 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  avatar  avatar

Watchers

 avatar  avatar  avatar

innopolis_vtol_dynamics's Issues

Can not start sim in sitl_flight_goggles mode

I get the following error
[ERROR] [1694854506.985331624]: Dynamics type with name "quadcopter" is not exist. when I start HITL sim in SITL mode, using ./scripts/docker.sh sitl_flight_goggles

It seems that ./scripts/run_sim.sh has wrong dynamics in sitl_flight_goggles function. After consulting ./uav_dynamics/inno_vtol_dynamics/launch/sitl.launch for the correct argument for the dynamics flag, I replaced quadcopter with flightgoggles_multicopter on line 185 of ./scripts/run_sim.sh. After that, simulators boots up without problems.

Btw, there are flightgoggles, iris and quadcopter entities, are they different names for the same thing?

Unknown target error

Probably I miss something. I couldn't fix the problem.

~/PX4-Autopilot$ DONT_RUN=1 make px4_sitl gazebo_innopolis_vtol
ninja: error: unknown target 'gazebo_innopolis_vtol'
Makefile:231: recipe for target 'px4_sitl' failed
make: *** [px4_sitl] Error 1

Is propeller location calculation is right?

In vtolDynamicsSim.cpp:loadParams() function, propeller locations are created by multiplying sin(45) for x and y locations.

params_.propellersLocation[0] << propLocX * sin(3.1415/4),  propLocY * sin(3.1415/4), propLocZ;
params_.propellersLocation[1] <<-propLocX * sin(3.1415/4), -propLocY * sin(3.1415/4), propLocZ;
params_.propellersLocation[2] << propLocX * sin(3.1415/4), -propLocY * sin(3.1415/4), propLocZ;
params_.propellersLocation[3] <<-propLocX * sin(3.1415/4),  propLocY * sin(3.1415/4), propLocZ;

I think multiplying sin45 is unnecessary and wrong. I am not sure of it, still trying to understand all part of code. In body frame, locx is simply distance in x axis. Please correct me if I'm wrong.

// That might be the solution if i think right
params_.propellersLocation[0] << propLocX,  propLocY,  propLocZ;
params_.propellersLocation[1] <<-propLocX, -propLocY,  propLocZ;
params_.propellersLocation[2] << propLocX, -propLocY,  propLocZ;
params_.propellersLocation[3] <<-propLocX,  propLocY,  propLocZ;

Setting CMAKE_BUILD_TYPE as Debug causes exiting the program after arming the vehicle in SITL mode

CMAKE_BUILD_TYPE is currently set as RelWithDebInfo in inno_vtol_dynamics project.

CMakeLists.txt:9
SET(CMAKE_BUILD_TYPE RelWithDebInfo)

If I set it to Debug and arm the vehicle. Program exits.

[ INFO] [1646913596.306345559]: inno_vtol:  mc  [0.00, 0.00, 0.00, 0.00]  fw rpy  [0.00, 0.00, 0.00] throttle  [0.00],  enu pose  [0.0, 0.0, 0.0]
[ INFO] [1646913596.872489711]: cmd: Arm
node: /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h:364: Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator()(Eigen::Index, Eigen::Index) [with Derived = Eigen::Matrix<double, -1, -1>; Eigen::DenseCoeffsBase<Derived, 1>::Scalar = double; Eigen::Index = long int]: Assertion `row >= 0 && row < rows() && col >= 0 && col < cols()' failed.
================================================================================REQUIRED process [inno_dynamics_sim-4] has died!
process has died [pid 294660, exit code -6, cmd /home/prihex/catkin_ws/devel/lib/innopolis_vtol_dynamics/node __name:=inno_dynamics_sim __log:=/home/prihex/.ros/log/90dcdc54-a069-11ec-9b20-d93dcf7f6b57/inno_dynamics_sim-4.log].
log file: /home/prihex/.ros/log/90dcdc54-a069-11ec-9b20-d93dcf7f6b57/inno_dynamics_sim-4*.log
Initiating shutdown!
================================================================================
[rosapi-9] killing on exit
[rosbridge_websocket-8] killing on exit
[static_transform_publisher_camera-7] killing on exit
[static_transform_publisher1-6] killing on exit

Misleading message about missing dependency

When I have first launched autopilot_configure.py, I was greeted with the following error

kotik@YURIY-DESKTOP:~/innopolis_vtol_dynamics$ ./scripts/autopilot_configure.py
Error: No module named 'mavlink_tools'
Try: `python3 -m pip install --index-url https://test.pypi.org/simple/ mavlink_tools`.

I then installed the package, and launched the autopilot_configure.py once again, and got this message

kotik@YURIY-DESKTOP:~/innopolis_vtol_dynamics$ ./scripts/autopilot_configure.py
Error: No module named 'pymavlink'
Try: `python3 -m pip install --index-url https://test.pypi.org/simple/ mavlink_tools`.

It looks like it suggests me to install mavlink_tools once again (maybe pymavlink is a part of mavlink_tools and this is what the "Error: No module" means), however, it is not the case. pymavlink should be installed separately via

pip install pymavlink

and then autopilot_configure.py works

My suggestion is to either remove the line with "Try python3 ..... " entirely and let user manage their dependencies, or supply requirements.txt file, or add a separate prompt with instructions for pymavlink and mavlink_tools respectively, because for now this message misleads user into thinking that they are missing mavlink_tools package, not pymavlink.

Into PX4 docs/codelines?

This is awesome. Would be great to get this linked into the PX4 User Guide! Fantastic for people to be able to find this when looking into Simulators and UAVCAN.

  • Is that something that you are planning?
  • I see you branch off version 1.12. Is there an intent to push this into master?
  • What can I do to help with integration into the PX4 docs?

Couldn't run docker image

I get the following error.

$ sudo docker build .
.
.
.
Successfully built 29a64680dfe7
$ sudo docker run 29a64680dfe7
.
.
.
Param node_id: inno.dynamics
terminate called after throwing an instance of 'std::runtime_error'
  what():  Failed to add iface
================================================================================REQUIRED process [px4_uavcan_communicator-3] has died!
process has died [pid 113, exit code -6, cmd /catkin_ws/devel/lib/uavcan_communicator/uavcan_communicator __name:=px4_uavcan_communicator __log:=/root/.ros/log/b9f39b44-9332-11ec-89fc-0242ac110002/px4_uavcan_communicator-3.log].
log file: /root/.ros/log/b9f39b44-9332-11ec-89fc-0242ac110002/px4_uavcan_communicator-3*.log
Initiating shutdown!
================================================================================
RLException: cannot add process [innosim_relay_node-5] after process monitor has been shut down
The traceback for the exception was written to the log file
.
.
# it terminates
$ sudo docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
$

I can not see log file. .ros directory doesn't exist in my /root directory.

I do not know what I am missing.

OS: Ubuntu 18.04
ROS: melodic (I ve changed in ROS_DISTRO as melodic in docker file)

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.