Skip to content
Snippets Groups Projects
Commit 02872d6b authored by Tommy Persson's avatar Tommy Persson
Browse files

Work on development environmant

parent da8e2f7c
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,14 @@ If you have a ROS machine already follow the following instructions:
- [Prepare Existing ROS Computer](doc/prepare_ros_computer.md)
- [Local ROS Installation and LRS Docker Modules](doc/local_ros_installation.md)
The above links gove information how to setup and test basic functionality.
For moer information how to integrate your code we have plit the
informaion in different sub areas:
- [Waraps Control](https://gitlab.liu.se/lrs/waraps_control)
- [Waraps Motion Planning](https://gitlab.liu.se/lrs/waraps_motion_planning)
- [Waraps Task Planning](https://gitlab.liu.se/lrs/waraps_task_planning)
......
......@@ -247,83 +247,6 @@ Flyto
wexec rosrun lrs_tst tstcommand.py --fly -x 100 -y 100 -z 12 --speed 3 --exec __ns:=/dji0 --disp --op /dji0
```
## Starting dji sim without controller
To plug in your own controller djisim can be started without any controller:
```bash
wexec roslaunch lrs_launch djisimtst.launch dynamics:=true ns:=/dji0
```
The "state" is available on topics:
- /dji0/world_position
- /dji0/dji_sdk/gps_position
The control is done on the topic:
- /dji0/dji_sdk/flight_control_setpoint_generic
and the control mode must be:
- roll
- pitch
- thrust
- yawrate
## Compiling Simulator
If you have access to the simulator repos you can compile it locally.
Needed extra packages:
```bash
git clone git@gitlab.liu.se:lrs/lrs_basic.git
git clone git@gitlab.liu.se:lrs/motion_models.git
git clone git@gitlab.liu.se:lrs/nonlinearmpc.git
git clone https://github.com/dji-sdk/Onboard-SDK-ROS.git
cd Onboard-SDK-ROS
git checkout 3.8
```
These packages are:
- lrs_basic: Needed for som very basic functionality
- motion_models: The actual dynamic simulator. The simulation code is in the header file.
- nonlinearmpc: Basically a copy of the original ETH code for the trajector follower using model predictive control.
- Onboard-SDK-ROS: The ROS API to dji. Need the basic sdk which is installed as described below.
To update all repos do:
```bash
vcs-pull
```
vcs-pull is part of the package python3-vcstool
Install the DJI SDK:
```bash
git clone https://github.com/dji-sdk/Onboard-SDK.git
cd Onboard-SDK
git checkout 3.8
cd osd-core
mkdir build
cd build
cmake ../
make -j 4 djiosdk-core
sudo make install djiosdk-core
```
## Running Simulator Locally
### Start dji0 with simulator running from local repos
On the local machine run:
```bash
roslaunch lrs_dji_sim sim.launch dynamics:=true mpc:=true ns:=/dji0
```
In the docker run
```bash
wexec roslaunch lrs_launch djisimtst.launch simulator:=false ns:=/dji0
```
## Flying with Gamepad
For this case it is more convenient to runt the roscore on the local machine:
......@@ -369,7 +292,7 @@ wexec roslaunch lrs_launch config.launch location:=granso no_airspace_booking:=t
wexec roslaunch lrs_launch djisimtst.launch dynamics:=true publish_pose:=true mpc:=true inair:=true ns:=/dji0
```
Start the joysick controller:
Start the joystick controller:
```bash
wexec rosrun lrs_dji_sim joypose.py __ns:=/dji0
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment