dqrobotics / cpp-examples

DQ Robotics cpp examples
GNU Lesser General Public License v3.0
5 stars 5 forks source link

[BUG] The example vrep_interface_move_kuka_and_youtubot.cpp is not working #10

Closed juanjqo closed 2 years ago

juanjqo commented 2 years ago

Hi @dqrobotics/developers!

Bug description

To Reproduce From cpp-examples (master): Build and run vrep_interface/vrep_interface_move_kuka_and_youtbot.cpp

Code From cpp-examples (master):

  cmake/vrep_interface/vrep_interface_move_kuka_and_youtbot.cpp

Output

Starting V-REP simulation...
There was an error connecting to V-REP, please check that it is open and that the Kuka Robot is in the scene.
Tried to access chain index 7 which is unnavailable.

Expected behavior

Environment:

mmmarinho commented 2 years ago

@juanjqo Try the new version.

Notice that I moved away from CPLEX so please install qpOASES.

juanjqo commented 2 years ago

@mmmarinho The example (vrep_interface_move_kuka.cpp) is not compiling. It is required adding the line

#include <dqrobotics/robot_modeling/DQ_SerialWholeBody.h>

in the source code and adding pthread in the CMake:

TARGET_LINK_LIBRARIES(vrep_interface_move_kuka_and_youbot
    pthread
    dqrobotics
    dqrobotics-interface-vrep
    qpOASES
)

However, the class YouBotVrepRobot (from dqrobotics/cpp-interface-vrep) is still using (in my local files) DQ_WholeBody instead of DQ_SerialWholeBody. Maybe I have to wait to get the last update available in the PPA?

mmmarinho commented 2 years ago

@juanjqo Either wait for the PPA to update (could take around 24 hours) or compile and install the .deb.

mmmarinho commented 2 years ago

@juanjqo

This could conflict with the PPA so you'd have to remove it first (and all related packages).

Just FYI

cd ~
git clone https://github.com/dqrobotics/cpp.git
cd cpp
./.github/scripts/ubuntu/build.sh
sudo ./.github/scripts/ubuntu/install.sh