Search found 11 matches

by 3mayuge3
24 Jan 2020, 06:26
Forum: General questions
Topic: Multi clients connection in synchronous mode, remote API
Replies: 1
Views: 138

Multi clients connection in synchronous mode, remote API

Hello, I'm trying to control a simulation by multi clients (c++ and python, remote API). And one client, c++ program, should be in synchronous mode. So I wrote the code as follows. But when the simulation started, simxSynchronous return 8, simx_return_remote_error_flag. Dose anyone know the reason? ...
by 3mayuge3
17 Oct 2019, 08:11
Forum: General questions
Topic: Compile c++ code by cmake, using remote API
Replies: 2
Views: 312

Re: Compile c++ code by cmake, using remote API

Hello,

Thank you for your reply! And I changed project(tamesi2 CXX) to project(tamesi2 C CXX) and it worked correctly!
by 3mayuge3
11 Oct 2019, 06:31
Forum: General questions
Topic: Compile c++ code by cmake, using remote API
Replies: 2
Views: 312

Compile c++ code by cmake, using remote API

Hello I'm trying to control simulation by remote API, c++, at ubuntu. So I made CMakeLists.txt and do "cmake .." and "make". The code is: #include <iostream> #include <thread> extern "C" { #include "extApi.h" } void th_sample() { std::cout << "thread id: " << std::this_thread::get_id() << std::endl;...
by 3mayuge3
04 Oct 2019, 09:36
Forum: General questions
Topic: Get handles by GetObjectGroupData, c++
Replies: 4
Views: 358

Re: Get handles by GetObjectGroupData, c++

Oh, OK... I will try other way. Thank you for your replies.
by 3mayuge3
01 Oct 2019, 08:18
Forum: General questions
Topic: Get handles by GetObjectGroupData, c++
Replies: 4
Views: 358

Re: Get handles by GetObjectGroupData, c++

Hello. Thank you for your reply!

handlesCount is 30, a number of joints.
I try to get parent object handles, but both objects and parent object handles are -572662307.
I also try to get handles of object (sim_object_shape_type) and it worked well.
by 3mayuge3
30 Sep 2019, 07:12
Forum: General questions
Topic: Get handles by GetObjectGroupData, c++
Replies: 4
Views: 358

Get handles by GetObjectGroupData, c++

Helllo, I'm trying to get joints' and objects' handles by GetObjectGroupData via remote API of C++. I wrote the code as follow. But all handles shows "-572662307", I seem it means I couldn't get the data. Do you know what happen? Would anyone help me? Thank you. simxFinish(-1); int clientID = simxSt...
by 3mayuge3
27 Jan 2019, 06:05
Forum: General questions
Topic: Using simxCallScriptFunction in headless mode
Replies: 2
Views: 786

Re: Using simxCallScriptFunction in headless mode

Thank you for your reply.

Ok, I' ll check simulation and scene again. Thank you for your advice.
by 3mayuge3
24 Jan 2019, 04:34
Forum: General questions
Topic: Using simxCallScriptFunction in headless mode
Replies: 2
Views: 786

Using simxCallScriptFunction in headless mode

Hello, I have one question about headless mode. I would like to call my function written in child script when the simulation is headless mode. I using python code (remote API), so it's better to use simxCallScriptFunction. I tried that, but it didn't work well (get return code 8). In the first place...
by 3mayuge3
20 Dec 2018, 06:02
Forum: General questions
Topic: After sim.ResetDynamicObject and move a model
Replies: 1
Views: 578

After sim.ResetDynamicObject and move a model

Hello, I'm trying to control my humanoid robot via remote API (python). To control the joints, I set them "Torque/force mode" and use simxSetJointTargetVelocity. And for my task, I have to move the model instantaneously. So I checked this forum and I found a way (at least I understood like that) : 1...
by 3mayuge3
10 Dec 2018, 08:03
Forum: General questions
Topic: Synchronous operation with Python using remote API
Replies: 3
Views: 1047

Re: Synchronous operation with Python using remote API

Hello, Thank you for your quick response. Oh, I didn't notice. I tried that and maybe it's done well. Actually, my final goal is to control joints of a robot at 5 ms period with remote API. For example, while python code is calculating, it is desirable that the simulation step wait. Is it possible? ...